Index: trunk/phase3/includes/Html.php |
— | — | @@ -126,7 +126,12 @@ |
127 | 127 | * Identical to rawElement(), but HTML-escapes $contents. |
128 | 128 | */ |
129 | 129 | public static function element( $element, $attribs = array(), $contents = '' ) { |
130 | | - return self::rawElement( $element, $attribs, htmlspecialchars( $contents ) ); |
| 130 | + return self::rawElement( $element, $attribs, strtr( $contents, array( |
| 131 | + # There's no point in escaping quotes, >, etc. in the contents of |
| 132 | + # elements. |
| 133 | + '&' => '&', |
| 134 | + '<' => '<' |
| 135 | + ) ) ); |
131 | 136 | } |
132 | 137 | |
133 | 138 | /** |