Add unit test for images in markdown

This commit is contained in:
Owen Conti
2017-10-08 10:26:32 -06:00
parent 1785d48746
commit 60e8091eed
2 changed files with 36 additions and 23 deletions

View File

@@ -30,6 +30,9 @@ export default Markdown
const sanitizeOptions = {
allowedTags: sanitize.defaults.allowedTags.concat([ "h1", "h2", "img" ]),
allowedAttributes: {
"img": sanitize.defaults.allowedAttributes.img.concat(["title"])
},
textFilter: function(text) {
return text.replace(/"/g, "\"")
}