From e98f24917225837164dfd3ec8ad1d35d7e70474f Mon Sep 17 00:00:00 2001 From: svncommit <devs@roundcube.net> Date: Wed, 19 Aug 2009 14:33:26 -0400 Subject: [PATCH] Added # to washtml's regex for safe links (some list digests have tables of contents that use internal links). --- 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 efd525d..01b0488 100644 --- a/program/lib/washtml.php +++ b/program/lib/washtml.php @@ -171,7 +171,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))) $t .= ' style="' . $style . '"'; -- Gitblit v1.9.1