From f38dfc294abde08a7296f871397f18c2162f143d Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Thu, 22 Dec 2011 05:32:22 -0500 Subject: [PATCH] Accept absolute urls without protocol --- program/lib/washtml.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/program/lib/washtml.php b/program/lib/washtml.php index f8c3251..04a65c7 100644 --- a/program/lib/washtml.php +++ b/program/lib/washtml.php @@ -199,7 +199,7 @@ $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 ? "'" : '"'; -- Gitblit v1.9.1