From ace390a7a33866907a12db17f13156083190dc62 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 5 Nov 2009 08:35:49 +0000 Subject: [PATCH] fixing a problem regarding the activation of links encoded with htmlspecialchars --- phpgwapi/inc/class.html.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index 4c319e58fa..5c8ccb1fbc 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -144,7 +144,9 @@ class html static function activate_links($content) { if (!$content || strlen($content) < 20) return $content; // performance - + // this seems to be needed as the preg_replace to match things beginning with http:// (or other protocols) + // seems to be throwing out & and leaving &; - which is breaking links. + $content = htmlspecialchars_decode($content); // Exclude everything which is already a link $NotAnchor = '(?