Skip to content
Snippets Groups Projects
Commit 82c31641 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #686 from greezybacon/issue/674


html: Be careful not to strip too much

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 3f3e28a6 fb4f01ca
No related branches found
No related tags found
No related merge requests found
......@@ -199,7 +199,7 @@ class Format {
function safe_html($html) {
// Remove HEAD and STYLE sections
$html = preg_replace(
array(':<(head|style|script).+</\1>:is', # <head> and <style> sections
array(':<(head|style|script).+?</\1>:is', # <head> and <style> sections
':<!\[[^]<]+\]>:', # <![if !mso]> and friends
':<!DOCTYPE[^>]+>:', # <!DOCTYPE ... >
':<\?[^>]+>:', # <?xml version="1.0" ... >
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment