Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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(
'="',
"='",
Expand Down
10 changes: 10 additions & 0 deletions WordPressVIPMinimum/Tests/VIP/ProperEscapingFunctionUnitTest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,13 @@ echo "<a title='" . esc_html( $some_var ) . "'></a>"; // NOK.
<a href="<?php esc_url( $url );?>"></a> <!-- OK. -->

<a title="<?php esc_attr( $url );?>"></a> <!-- OK. -->

<?php

echo '<media:content url="' . esc_url( $post_image ) . '" medium="image">'; // OK.

echo '<media:content url="' . esc_attr( $post_image ) . '" medium="image">'; // NOK.

echo 'data-param-url="' . esc_url( $share_url ) . '"'; // OK.

echo 'data-param-url="' . esc_html( $share_url ) . '"'; // NOK.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public function getErrorList() {
17 => 1,
21 => 1,
23 => 1,
33 => 1,
37 => 1,
);
}

Expand Down