diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-09-30 18:06:41 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-09-30 18:06:41 +0000 |
| commit | f0261cee4b9e1352139c4afee8e50a342e37f3f7 (patch) | |
| tree | 804beb228d7080adac4346e33d7b2020d9ff6fb7 | |
| parent | 5fd558540d81855e8498fdcd9c47b41d9a8ee7c1 (diff) | |
- Fix handling HTML comments in HTML messages (#1486189)
git-svn-id: https://svn.roundcube.net/trunk@3002 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/CHANGELOG | 1 | ||||
| -rw-r--r-- | roundcubemail/program/steps/mail/func.inc | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index d462bf19f..561bb60a7 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG RoundCube Webmail =========================== +- Fix handling HTML comments in HTML messages (#1486189) - Fix folder/messagelist controls alignment - icons used (#1486072) - Fix LDAP addressbook shows 'Contact not found' error sometimes (#1486178) - Fix cache status checking + improve cache operations performance (#1486104) diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index 35354eb28..0f835e9ae 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -734,7 +734,7 @@ function rcmail_wash_html($html, $p = array(), $cid_replaces) // allow CSS styles, will be sanitized by rcmail_washtml_callback() $washer->add_callback('style', 'rcmail_washtml_callback'); - + $html = $washer->wash($html); $REMOTE_OBJECTS = $washer->extlinks; @@ -892,6 +892,10 @@ function rcmail_html_tag_callback($matches) { $tagname = $matches[2]; + // html comments (#1486189) + if ($matches[1] == '<!') + return '<!'; + $tagname = preg_replace(array( '/:.*$/', // Microsoft's Smart Tags <st1:xxxx> '/[^a-z0-9_-]/i', // forbidden characters |
