From: Aryeh Gregor Date: Fri, 21 Aug 2009 20:38:53 +0000 (+0000) Subject: Don't escape >" in tag contents, no point X-Git-Tag: 1.31.0-rc.0~40160 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=ef664913d1375ab50c55e8ec2666866688586916;p=lhc%2Fweb%2Fwiklou.git Don't escape >" in tag contents, no point --- 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. + '&' => '&', + '<' => '<' + ) ) ); } /**