X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSanitizer.php;h=4c996771e89f5bf761ebdebf6e8cf7d54a5c10c2;hb=54dbf668a1f6b0a4720ec9a64368646ef19f9ccd;hp=7d17cd1065efb073d864a85cf8fb5d5cacf8923e;hpb=f1c7c0f03da1607dc955dc8db879a16fc0575657;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index 7d17cd1065..4c996771e8 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -824,7 +824,7 @@ class Sanitizer { || $attribute === 'aria-labelledby' || $attribute === 'aria-owns' ) { - $value = self::escapeIdReferenceList( $value, 'noninitial' ); + $value = self::escapeIdReferenceList( $value ); } // RDFa and microdata properties allow URLs, URIs and/or CURIs. @@ -1203,8 +1203,6 @@ class Sanitizer { global $wgExperimentalHtmlIds; $options = (array)$options; - $id = self::decodeCharReferences( $id ); - if ( $wgExperimentalHtmlIds && !in_array( 'legacy', $options ) ) { $id = preg_replace( '/[ \t\n\r\f_\'"&#%]+/', '_', $id ); $id = trim( $id, '_' ); @@ -1313,8 +1311,6 @@ class Sanitizer { * @return string */ private static function escapeIdInternal( $id, $mode ) { - $id = self::decodeCharReferences( $id ); - switch ( $mode ) { case 'html5': $id = str_replace( ' ', '_', $id ); @@ -1348,7 +1344,7 @@ class Sanitizer { * Given a string containing a space delimited list of ids, escape each id * to match ids escaped by the escapeId() function. * - * @todo wfDeprecated() uses of $options in 1.31, remove completely in 1.32 + * @todo remove $options completely in 1.32 * * @since 1.27 * @@ -1357,6 +1353,9 @@ class Sanitizer { * @return string */ static function escapeIdReferenceList( $referenceString, $options = [] ) { + if ( $options ) { + wfDeprecated( __METHOD__ . ' with $options', '1.31' ); + } # Explode the space delimited list string into an array of tokens $references = preg_split( '/\s+/', "{$referenceString}", -1, PREG_SPLIT_NO_EMPTY );