From f53d5f04e85275ee31be5398cfc31dc431e9aaff Mon Sep 17 00:00:00 2001 From: Rebecca Hum <16962021+rebeccahum@users.noreply.github.com> Date: Tue, 2 Mar 2021 13:35:05 -0700 Subject: [PATCH] Instead of checking token is not T_INLINE_HTML, explicitly look for string tokens In the case that PHP adds another type of string token --- .../Sniffs/Security/ProperEscapingFunctionSniff.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPressVIPMinimum/Sniffs/Security/ProperEscapingFunctionSniff.php b/WordPressVIPMinimum/Sniffs/Security/ProperEscapingFunctionSniff.php index 6393eda8..3383f22d 100644 --- a/WordPressVIPMinimum/Sniffs/Security/ProperEscapingFunctionSniff.php +++ b/WordPressVIPMinimum/Sniffs/Security/ProperEscapingFunctionSniff.php @@ -86,7 +86,7 @@ public function process_token( $stackPtr ) { $content = $this->tokens[ $html ]['content']; - if ( $this->tokens[ $html ]['code'] !== 'T_INLINE_HTML' ) { + if ( isset( Tokens::$stringTokens[ $this->tokens[ $html ]['code'] ] ) === true ) { $content = Sniff::strip_quotes( $content ); }