HubSpot / vex

A modern dialog library which is highly configurable and easy to style. #hubspot-open-source
http://github.hubspot.com/vex/docs/welcome
MIT License
6.92k stars 493 forks source link

HTML Not implemented when unsafeContent set #226

Closed bharal closed 6 years ago

bharal commented 7 years ago

Using the unsafeContent parameter does not work with the minifed version.

This code

var d=c.unsafeContent=f(c)

seems to be the culprit, removing the call to f(c) returns unsafeContent to appearing.

I don't see this in the source code, so I'm unsure what the minimized version is pulling to show this.

Also, the test if(a.unsafeContent&!a.content) is ambiguous, and it isnt specified in the docs that setting content and unsafeContent ignores the unsafe content entirely. Better would be to have an unsafeContent flag if you're doing this, as it makes clear what your intentions are. Well, make an unsafeContentFlag flag, so that older versions are still compatible with the flag.

bbatliner commented 6 years ago

This is because vex-dialog uses different options: message and unsafeMessage. See my comment here. There might be more we can do to improve the documentation surrounding this option.