diff options
author | Hugues Hiegel <root@paranoid> | 2014-08-05 16:46:22 +0200 |
---|---|---|
committer | Hugues Hiegel <root@paranoid> | 2014-08-05 16:46:22 +0200 |
commit | 59478e06c25303a790a0840ab2ac30662c4ef781 (patch) | |
tree | 8d5e964a8f94adaef41efebb0597629f11495c42 /program/lib/Roundcube/rcube_washtml.php | |
parent | 7c494b677f9e470ee0d32e62cfa8dc709f39e748 (diff) |
c'est la merde..working
Diffstat (limited to 'program/lib/Roundcube/rcube_washtml.php')
-rw-r--r-- | program/lib/Roundcube/rcube_washtml.php | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/program/lib/Roundcube/rcube_washtml.php b/program/lib/Roundcube/rcube_washtml.php index 8f7fe9749..f964f8b35 100644 --- a/program/lib/Roundcube/rcube_washtml.php +++ b/program/lib/Roundcube/rcube_washtml.php @@ -410,25 +410,6 @@ class rcube_washtml ); $html = preg_replace($html_search, $html_replace, trim($html)); - //-> Replace all of those weird MS Word quotes and other high characters - $badwordchars=array( - "\xe2\x80\x98", // left single quote - "\xe2\x80\x99", // right single quote - "\xe2\x80\x9c", // left double quote - "\xe2\x80\x9d", // right double quote - "\xe2\x80\x94", // em dash - "\xe2\x80\xa6" // elipses - ); - $fixedwordchars=array( - "'", - "'", - '"', - '"', - '—', - '...' - ); - $html = str_replace($badwordchars,$fixedwordchars, $html); - // PCRE errors handling (#1486856), should we use something like for every preg_* use? if ($html === null && ($preg_error = preg_last_error()) != PREG_NO_ERROR) { $errstr = "Could not clean up HTML message! PCRE Error: $preg_error."; @@ -448,7 +429,7 @@ class rcube_washtml } // fix (unknown/malformed) HTML tags before "wash" - $html = preg_replace_callback('/(<[\/]*)([^\s>]+)/', array($this, 'html_tag_callback'), $html); + $html = preg_replace_callback('/(<(?!\!)[\/]*)([^\s>]+)/', array($this, 'html_tag_callback'), $html); // Remove invalid HTML comments (#1487759) // Don't remove valid conditional comments |