From: Michael M Slusarz Date: Fri, 16 Jul 2010 16:50:15 +0000 (-0600) Subject: Remove double encoded entities in title attribute X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=1ecf24cad25d135302eca71c28032a325b1ca4e1;p=horde.git Remove double encoded entities in title attribute --- 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; }