diff --git a/WordPress/Helpers/EscapingFunctionsTrait.php b/WordPress/Helpers/EscapingFunctionsTrait.php index d66ba2992f..d4664775aa 100644 --- a/WordPress/Helpers/EscapingFunctionsTrait.php +++ b/WordPress/Helpers/EscapingFunctionsTrait.php @@ -223,7 +223,7 @@ public function is_escaping_function( $functionName ) { $this->addedCustomEscapingFunctions['escape'] = $this->customEscapingFunctions; } - return isset( $this->allEscapingFunctions[ $functionName ] ); + return isset( $this->allEscapingFunctions[ strtolower( $functionName ) ] ); } /** @@ -247,6 +247,6 @@ public function is_auto_escaped_function( $functionName ) { $this->addedCustomEscapingFunctions['autoescape'] = $this->customAutoEscapedFunctions; } - return isset( $this->allAutoEscapedFunctions[ $functionName ] ); + return isset( $this->allAutoEscapedFunctions[ strtolower( $functionName ) ] ); } } diff --git a/WordPress/Tests/Security/EscapeOutputUnitTest.inc b/WordPress/Tests/Security/EscapeOutputUnitTest.inc index a08c5675fd..c4e429ac37 100644 --- a/WordPress/Tests/Security/EscapeOutputUnitTest.inc +++ b/WordPress/Tests/Security/EscapeOutputUnitTest.inc @@ -15,7 +15,7 @@ while ( have_posts() ) { ?>
- + ' . sprintf( esc_html__( 'Some text -> %sLink text%s', 'textdomain' ), '', '' ). ''; // Ok. +echo '' . sprintf( esc_html__( 'Some text -> %sLink text%s', 'textdomain' ), '', '' ). '
'; // Ok. echo '