Merge "Create users and pages for Selenium tests using action API"
[lhc/web/wiklou.git] / includes / Sanitizer.php
index 0f7991a..dd4a314 100644 (file)
@@ -906,7 +906,6 @@ class Sanitizer {
         * @return string normalized css
         */
        public static function normalizeCss( $value ) {
-
                // Decode character references like {
                $value = Sanitizer::decodeCharReferences( $value );
 
@@ -1207,7 +1206,7 @@ class Sanitizer {
                ];
 
                $id = urlencode( strtr( $id, ' ', '_' ) );
-               $id = str_replace( array_keys( $replace ), array_values( $replace ), $id );
+               $id = strtr( $id, $replace );
 
                if ( !preg_match( '/^[a-zA-Z]/', $id ) && !in_array( 'noninitial', $options ) ) {
                        // Initial character must be a letter!