Allow images with data scheme (#4305)

* Add UnitTest for images

allows image elements with https scheme

* Test images with data scheme

* Add allowedSchemesByTag

* Fix error  Strings must use doublequote  quotes
This commit is contained in:
Helder Sepulveda
2018-03-08 20:17:30 -05:00
committed by kyle
parent 6ba93ad43f
commit ebf94dfccf
2 changed files with 25 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ const sanitizeOptions = {
"td": [ "colspan" ],
"*": [ "class" ]
},
allowedSchemesByTag: { img: [ "http", "https", "data" ] },
textFilter: function(text) {
return text.replace(/"/g, "\"")
}