diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2013-02-05 16:26:57 +0100 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2013-02-05 16:26:57 +0100 |
commit | 5bc800f946e39ae0c5afcca79d6ae0af561fc536 (patch) | |
tree | ea158317dbd3d74463ca65cad83c8612bd9448ab /program/lib/Roundcube/rcube_washtml.php | |
parent | 344943f6ce40bb40470dba4e2ba56b366d493617 (diff) | |
parent | 3dd136f26e36d0f453649e77300b408cfa8491e4 (diff) |
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/lib/Roundcube/rcube_washtml.php')
-rw-r--r-- | program/lib/Roundcube/rcube_washtml.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_washtml.php b/program/lib/Roundcube/rcube_washtml.php index 715c46047..2a261419f 100644 --- a/program/lib/Roundcube/rcube_washtml.php +++ b/program/lib/Roundcube/rcube_washtml.php @@ -240,7 +240,8 @@ class rcube_washtml $value = $node->getAttribute($key); if (isset($this->_html_attribs[$key]) || - ($key == 'href' && !preg_match('!^(javascript|vbscript|data:text)!i', $value) + ($key == 'href' && ($value = trim($value)) + && !preg_match('!^(javascript|vbscript|data:text)!i', $value) && preg_match('!^([a-z][a-z0-9.+-]+:|//|#).+!i', $value)) ) { $t .= ' ' . $key . '="' . htmlspecialchars($value, ENT_QUOTES) . '"'; |