From 1ecf24cad25d135302eca71c28032a325b1ca4e1 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 16 Jul 2010 10:50:15 -0600 Subject: [PATCH] Remove double encoded entities in title attribute --- framework/Core/lib/Horde.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/framework/Core/lib/Horde.php b/framework/Core/lib/Horde.php index 65e2a59b7..ee86ca397 100644 --- a/framework/Core/lib/Horde.php +++ b/framework/Core/lib/Horde.php @@ -1162,7 +1162,11 @@ HTML; htmlspecialchars( nl2br(htmlspecialchars($title, ENT_QUOTES, $charset)), ENT_QUOTES, $charset)); + error_reporting($old_error); + + /* Remove double encoded entities. */ + $title = preg_replace('/&([a-z]+|(#\d+));/i', '&\\1;', $title); } $attributes['title.raw'] = $title; } -- 2.11.0