X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fparser%2FStripState.php;h=4ed176ce28208a23e3beaf1e4dd4cef3ed267441;hp=b11dc8c388de2679649c56873b7795577a1f7af7;hb=c8e482371407477ecd4f0a1b5778e565d3963a93;hpb=9c092814c7f275db78a6ed769aa76fdd87709c60 diff --git a/includes/parser/StripState.php b/includes/parser/StripState.php index b11dc8c388..4ed176ce28 100644 --- a/includes/parser/StripState.php +++ b/includes/parser/StripState.php @@ -46,12 +46,12 @@ class StripState { wfDeprecated( __METHOD__ . ' with called with $prefix argument' . ' (call with no arguments instead)', '1.26' ); } - $this->data = array( - 'nowiki' => array(), - 'general' => array() - ); - $this->regex = '/' . Parser::MARKER_PREFIX . "([^\x7f]+)" . Parser::MARKER_SUFFIX . '/'; - $this->circularRefGuard = array(); + $this->data = [ + 'nowiki' => [], + 'general' => [] + ]; + $this->regex = '/' . Parser::MARKER_PREFIX . "([^\x7f<>&'\"]+)" . Parser::MARKER_SUFFIX . '/'; + $this->circularRefGuard = []; } /** @@ -124,7 +124,7 @@ class StripState { $oldType = $this->tempType; $this->tempType = $type; - $text = preg_replace_callback( $this->regex, array( $this, 'unstripCallback' ), $text ); + $text = preg_replace_callback( $this->regex, [ $this, 'unstripCallback' ], $text ); $this->tempType = $oldType; return $text; } @@ -216,7 +216,7 @@ class StripState { } $this->tempMergePrefix = $mergePrefix; - $texts = preg_replace_callback( $otherState->regex, array( $this, 'mergeCallback' ), $texts ); + $texts = preg_replace_callback( $otherState->regex, [ $this, 'mergeCallback' ], $texts ); $this->tempMergePrefix = null; return $texts; }