1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-13 03:25:56 +00:00

Making the script tag stripper case insensitive

This commit is contained in:
Scott Tolksdorf
2018-11-30 16:49:37 -05:00
parent ca10073fc8
commit 6b8c4de8ef

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'];