X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fexception%2FLocalizedException.php;h=c0182d5991c87c6845a9b57c2c1860cc8cfa583e;hb=b702f5a659caad091148a817563715b9f4760b96;hp=cbdb53ef4fe5e885cb7040cb1b75fb97dc7226e5;hpb=24dc5218b18bfa065a101057523f39a9c046d046;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/exception/LocalizedException.php b/includes/exception/LocalizedException.php index cbdb53ef4f..c0182d5991 100644 --- a/includes/exception/LocalizedException.php +++ b/includes/exception/LocalizedException.php @@ -45,8 +45,9 @@ class LocalizedException extends Exception implements ILocalizedException { /** * @param string|array|MessageSpecifier $messageSpec See Message::newFromSpecifier - * @param int $code Exception code - * @param Exception|Throwable $previous The previous exception used for the exception chaining. + * @param int $code + * @param Exception|Throwable|null $previous The previous exception used for the exception + * chaining. */ public function __construct( $messageSpec, $code = 0, $previous = null ) { $this->messageSpec = $messageSpec; @@ -56,7 +57,7 @@ class LocalizedException extends Exception implements ILocalizedException { // customizations, and make a basic attempt to turn markup into text. $msg = $this->getMessageObject()->inLanguage( 'en' )->useDatabase( false )->text(); $msg = preg_replace( '!!', '"', $msg ); - $msg = html_entity_decode( strip_tags( $msg ), ENT_QUOTES | ENT_HTML5 ); + $msg = Sanitizer::stripAllTags( $msg ); parent::__construct( $msg, $code, $previous ); }