diff --git a/frappe/public/js/frappe/dom.js b/frappe/public/js/frappe/dom.js index 7b59f9da08..6281ff7f76 100644 --- a/frappe/public/js/frappe/dom.js +++ b/frappe/public/js/frappe/dom.js @@ -34,7 +34,7 @@ frappe.dom = { }, remove_script_and_style: function(txt) { const evil_tags = ["script", "style", "noscript", "title", "meta", "base", "head"]; - const regex = new RegExp(evil_tags.map(tag => `<${tag}>.*<\\/${tag}>`).join('|')); + const regex = new RegExp(evil_tags.map(tag => `<${tag}>.*<\\/${tag}>`).join('|'), 's'); if (!regex.test(txt)) { // no evil tags found, skip the DOM method entirely! return txt;