Skip to content

Commit 2e175b1

Browse files
committed
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
1 parent a532c0c commit 2e175b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WordPressVIPMinimum/Sniffs/Security/ProperEscapingFunctionSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function process_token( $stackPtr ) {
8686

8787
$content = $this->tokens[ $html ]['content'];
8888

89-
if ( $this->tokens[ $html ]['code'] !== 'T_INLINE_HTML' ) {
89+
if ( isset( Tokens::$stringTokens[ $this->tokens[ $html ]['code'] ] ) === true ) {
9090
$content = Sniff::strip_quotes( $content );
9191
}
9292

0 commit comments

Comments
 (0)