Skip to content

Commit

Permalink
Coerce boolean attributes to ""
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Nov 29, 2024
1 parent 10a9c4c commit 2d3d5f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wp-includes/html-api/class-wp-css-selectors.php
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,10 @@ public function matches( WP_HTML_Processor $processor ): bool {
return true;
}

if ( true === $att_value ) {
$att_value = '';
}

$case_insensitive = self::MODIFIER_CASE_INSENSITIVE === $this->modifier;

switch ( $this->matcher ) {
Expand Down

0 comments on commit 2d3d5f8

Please sign in to comment.