Skip to content

Commit

Permalink
fix: allow html elements within noscript tag
Browse files Browse the repository at this point in the history
  • Loading branch information
xini committed Feb 7, 2022
1 parent 361b0a1 commit b66434b
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions thirdparty/html5lib-php/library/HTML5/TreeBuilder.php
Expand Up @@ -1354,11 +1354,23 @@ public function emitToken($token, $mode = null) {
$this->insertCDATAElement($token);
break;

case 'noembed': case 'noscript':
// XSCRIPT: should check scripting flag
case 'noembed':
$this->insertCDATAElement($token);
break;

case 'noscript':
// XSCRIPT: should check scripting flag

if($this->elementInScope('noscript')) {
$this->emitToken(array(
'name' => 'noscript',
'type' => HTML5_Tokenizer::ENDTAG
));
}
$this->reconstructActiveFormattingElements();
$this->insertElement($token);
break;

/* A start tag whose tag name is "select" */
case 'select':
/* Reconstruct the active formatting elements, if any. */
Expand Down Expand Up @@ -3837,4 +3849,3 @@ public function save() {
}
}
}

0 comments on commit b66434b

Please sign in to comment.