Skip to content

Commit

Permalink
Fix frameset checking and logic
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Jan 23, 2024
1 parent c651133 commit 60a1af7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/wp-includes/html-api/class-wp-html-processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -976,10 +976,18 @@ private function step_in_body() {
* > A start tag whose tag name is "input"
*/
case '+INPUT':

Check failure on line 978 in src/wp-includes/html-api/class-wp-html-processor.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

The CASE body must start on the line following the statement

Check failure on line 979 in src/wp-includes/html-api/class-wp-html-processor.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Functions must not contain multiple empty lines in a row; found 3 empty lines


$this->reconstruct_active_formatting_elements();
$this->insert_html_element( $this->state->current_token );
$type_attribute = $this->get_attribute( 'type' );
if ( null === $type_attribute || 'hidden' === strtolower( $type_attribute ) ) {
/*
* > If the token does not have an attribute with the name "type", or if it does,
* > but that attribute's value is not an ASCII case-insensitive match for the
* > string "hidden", then: set the frameset-ok flag to "not ok".
*/
if ( ! is_string( $type_attribute ) || 'hidden' !== strtolower( $type_attribute ) ) {
$this->state->frameset_ok = false;
}
return true;
Expand Down

0 comments on commit 60a1af7

Please sign in to comment.