Avoid double HTML encoding
authorFomafix <fomafix@googlemail.com>
Mon, 3 Jul 2017 07:13:09 +0000 (09:13 +0200)
committerFomafix <fomafix@googlemail.com>
Mon, 3 Jul 2017 15:55:15 +0000 (17:55 +0200)
Html:element() already makes an HTML encoding. The additional
htmlspecialchars is not necessary.

Change-Id: If0530c3d3cb0d3cc61e849a1c84ae0d68c242517

includes/exception/MWExceptionRenderer.php

index 579b6ca..2eb821a 100644 (file)
@@ -305,7 +305,7 @@ class MWExceptionRenderer {
                if ( $wgShowHostnames || $wgShowSQLErrors ) {
                        $info = str_replace(
                                '$1',
-                               Html::element( 'span', [ 'dir' => 'ltr' ], htmlspecialchars( $e->getMessage() ) ),
+                               Html::element( 'span', [ 'dir' => 'ltr' ], $e->getMessage() ),
                                htmlspecialchars( self::msg( 'dberr-info', '($1)' ) )
                        );
                } else {