diff --git a/WordPressVIPMinimum/Sniffs/VIP/ProperEscapingFunctionSniff.php b/WordPressVIPMinimum/Sniffs/VIP/ProperEscapingFunctionSniff.php index ec9d63e0..40bd759e 100644 --- a/WordPressVIPMinimum/Sniffs/VIP/ProperEscapingFunctionSniff.php +++ b/WordPressVIPMinimum/Sniffs/VIP/ProperEscapingFunctionSniff.php @@ -103,7 +103,7 @@ public function process( File $phpcsFile, $stackPtr ) { */ public function is_href_or_src( $content ) { $is_href_or_src = false; - foreach ( array( 'href', 'src' ) as $attr ) { + foreach ( array( 'href', 'src', 'url' ) as $attr ) { foreach ( array( '="', "='", diff --git a/WordPressVIPMinimum/Tests/VIP/ProperEscapingFunctionUnitTest.inc b/WordPressVIPMinimum/Tests/VIP/ProperEscapingFunctionUnitTest.inc index 072548af..9f801ace 100644 --- a/WordPressVIPMinimum/Tests/VIP/ProperEscapingFunctionUnitTest.inc +++ b/WordPressVIPMinimum/Tests/VIP/ProperEscapingFunctionUnitTest.inc @@ -25,3 +25,13 @@ echo ""; // NOK. + +'; // OK. + +echo ''; // NOK. + +echo 'data-param-url="' . esc_url( $share_url ) . '"'; // OK. + +echo 'data-param-url="' . esc_html( $share_url ) . '"'; // NOK. \ No newline at end of file diff --git a/WordPressVIPMinimum/Tests/VIP/ProperEscapingFunctionUnitTest.php b/WordPressVIPMinimum/Tests/VIP/ProperEscapingFunctionUnitTest.php index 6af02708..4b748157 100644 --- a/WordPressVIPMinimum/Tests/VIP/ProperEscapingFunctionUnitTest.php +++ b/WordPressVIPMinimum/Tests/VIP/ProperEscapingFunctionUnitTest.php @@ -29,6 +29,8 @@ public function getErrorList() { 17 => 1, 21 => 1, 23 => 1, + 33 => 1, + 37 => 1, ); }