Revert "Too many htmlspecialchars in link() for title attribute"
authorJan Schneider <jan@horde.org>
Tue, 26 Jan 2010 22:59:41 +0000 (23:59 +0100)
committerJan Schneider <jan@horde.org>
Tue, 26 Jan 2010 23:01:21 +0000 (00:01 +0100)
This reverts commit c92729ed228294b9d29b8a0e73be90e06ff45ab7.

This broke tags that are not properly encoded in title tag anymore, if being used for tooltips, e.g. in the nag portal block.

framework/Core/lib/Horde.php

index ca54bb4..3163080 100644 (file)
@@ -1296,8 +1296,9 @@ HTML;
                 $old_error = error_reporting(0);
                 $title = str_replace(
                     array("\r", "\n"), '',
-                    nl2br(htmlspecialchars($title, ENT_QUOTES, $charset))
-                );
+                    htmlspecialchars(
+                        nl2br(htmlspecialchars($title, ENT_QUOTES, $charset)),
+                        ENT_QUOTES, $charset));
                 error_reporting($old_error);
             }
             $attributes['title.raw'] = $title;