From ffb883f2a9a5ef17feca0411007f0a216c188ed7 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Mon, 12 Jun 2017 17:01:38 -0700 Subject: [PATCH] Use strtr() for clarity Change-Id: I35e7530c13fee028ea95a56df1bd2714a610db6e --- includes/Sanitizer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index 5aaa3ed106..8920e92f43 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -1207,7 +1207,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! -- 2.20.1