summaryrefslogtreecommitdiff
path: root/program/lib/washtml.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-12-22 10:32:22 +0000
committerthomascube <thomas@roundcube.net>2011-12-22 10:32:22 +0000
commitf38dfc294abde08a7296f871397f18c2162f143d (patch)
treea80b9e706c823a38af0af78fa97acb979aa563d0 /program/lib/washtml.php
parentc8c53f4ad1b4759841ab929eb4b3e770c5132eb1 (diff)
Accept absolute urls without protocol
Diffstat (limited to 'program/lib/washtml.php')
-rw-r--r--program/lib/washtml.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/lib/washtml.php b/program/lib/washtml.php
index f8c3251ad..04a65c7a1 100644
--- a/program/lib/washtml.php
+++ b/program/lib/washtml.php
@@ -199,7 +199,7 @@ class washtml
$key = strtolower($key);
$value = $node->getAttribute($key);
if (isset($this->_html_attribs[$key]) ||
- ($key == 'href' && preg_match('/^(http:|https:|ftp:|mailto:|#).+/i', $value)))
+ ($key == 'href' && preg_match('!^(http:|https:|ftp:|mailto:|//|#).+!i', $value)))
$t .= ' ' . $key . '="' . htmlspecialchars($value, ENT_QUOTES) . '"';
else if ($key == 'style' && ($style = $this->wash_style($value))) {
$quot = strpos($style, '"') !== false ? "'" : '"';