Question

I've working on an AngularJS solution, in which ngSanitize is used to sanitize markup received from an Ajax call.

This markup will occasionally contain iframe tags.

When I test the app with iframe tags, ngSanitize seems to remove them.

Do you have any suggestions as to how to get ngSanitize to ignore iframe tags and allow them to render?

Was it helpful?

Solution

Looks like this isn't possible using the current version of angular-sanitize.

An issue has been logged, to ask for the whitelists to be made extensible, so we can add more tags to them, such as .

Meantime, Brandy Isom has written a fix to enable such customization, and sent it as a pull-request to the Angular team. You can use this fix in the meantime.

(Hopefully it gets incorporated into the next version.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top