1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-11 08:56:02 +00:00

Making the script tag stripper case insensitive

This commit is contained in:
Scott Tolksdorf
2018-11-30 16:49:37 -05:00
committed by Rae2che5
parent 20b719d0de
commit 448ea5cf5c

View File

@@ -15,8 +15,8 @@ renderer.html = function (html) {
const sanatizeScriptTags = (content)=>{ const sanatizeScriptTags = (content)=>{
return content return content
.replace(/<script/g, '&lt;script') .replace(/<script/ig, '&lt;script')
.replace(/<\/script>/g, '&lt;/script&gt;'); .replace(/<\/script>/ig, '&lt;/script&gt;');
}; };
const tagTypes = ['div', 'span', 'a']; const tagTypes = ['div', 'span', 'a'];