From f38dfc294abde08a7296f871397f18c2162f143d Mon Sep 17 00:00:00 2001 From: thomascube Date: Thu, 22 Dec 2011 10:32:22 +0000 Subject: Accept absolute urls without protocol --- program/lib/washtml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'program/lib/washtml.php') 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 ? "'" : '"'; -- cgit v1.2.3