From ef664913d1375ab50c55e8ec2666866688586916 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Fri, 21 Aug 2009 20:38:53 +0000 Subject: [PATCH] Don't escape >" in tag contents, no point --- includes/Html.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/Html.php b/includes/Html.php index ae10ac6141..07d234ab15 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -126,7 +126,12 @@ class Html { * Identical to rawElement(), but HTML-escapes $contents. */ public static function element( $element, $attribs = array(), $contents = '' ) { - return self::rawElement( $element, $attribs, htmlspecialchars( $contents ) ); + return self::rawElement( $element, $attribs, strtr( $contents, array( + # There's no point in escaping quotes, >, etc. in the contents of + # elements. + '&' => '&', + '<' => '<' + ) ) ); } /** -- 2.20.1