Skip to content

Commit

Permalink
Add a check for escaping functions in the static methods
Browse files Browse the repository at this point in the history
  • Loading branch information
dingo-d committed Sep 16, 2023
1 parent de3319c commit 000c105
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions WordPress/Sniffs/Security/EscapeOutputSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,10 @@ protected function check_code_is_escaped( $start, $end ) {

// Content should be a class and a method/constant.
$content = ! empty( $fully_qualified_name ) ? trim( $fully_qualified_name ) : $content;

if ( $this->is_escaping_function( $content ) ) {
continue;
}
}
} else {
$content = $this->tokens[ $i ]['content'];
Expand Down

0 comments on commit 000c105

Please sign in to comment.