X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSanitizer.php;h=6a568c2d0cd67e08452c893151ada38a77da1ba2;hb=7eca0340f07aaea403aef307702c9d8de4601cc8;hp=59ac046f55f738233aa46bfb682d99f8cb90baae;hpb=280cb03b4d87e864a723686daf5d1699b3566ec1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index 59ac046f55..6a568c2d0c 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -358,7 +358,7 @@ class Sanitizer { * @param string $text * @param callable $processCallback Callback to do any variable or parameter * replacements in HTML attribute values - * @param array $args Arguments for the processing callback + * @param array|bool $args Arguments for the processing callback * @param array $extratags For any extra tags to include * @param array $removetags For any tags (default or extra) to exclude * @return string @@ -459,7 +459,10 @@ class Sanitizer { $badtag = true; } elseif ( $slash ) { # Closing a tag... is it the one we just opened? - $ot = @array_pop( $tagstack ); + wfSuppressWarnings(); + $ot = array_pop( $tagstack ); + wfRestoreWarnings(); + if ( $ot != $t ) { if ( isset( $htmlsingleallowed[$ot] ) ) { # Pop all elements with an optional close tag @@ -489,7 +492,10 @@ class Sanitizer { } } } else { - @array_push( $tagstack, $ot ); + wfSuppressWarnings(); + array_push( $tagstack, $ot ); + wfRestoreWarnings(); + #
  • can be nested in