diff options
-rw-r--r-- | src/HTML5/Elements.php | 4 | ||||
-rw-r--r-- | test/HTML5/Parser/DOMTreeBuilderTest.php | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/HTML5/Elements.php b/src/HTML5/Elements.php index 69c2767..d105343 100644 --- a/src/HTML5/Elements.php +++ b/src/HTML5/Elements.php @@ -24,7 +24,7 @@ class Elements const KNOWN_ELEMENT = 1; // From section 8.1.2: "script", "style" - // From 8.2.5.4.7 ("in body" insertion mode): "noembed", "noscript" + // From 8.2.5.4.7 ("in body" insertion mode): "noembed" // From 8.4 "style", "xmp", "iframe", "noembed", "noframes" /** * Indicates the contained text should be processed as raw text. @@ -144,7 +144,7 @@ class Elements "meta" => 9, // NORMAL | VOID_TAG "meter" => 1, "nav" => 17, // NORMAL | AUTOCLOSE_P, - "noscript" => 67, // NORMAL | TEXT_RAW | BLOCK_TAG + "noscript" => 65, // NORMAL | BLOCK_TAG "object" => 1, "ol" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG "optgroup" => 1, diff --git a/test/HTML5/Parser/DOMTreeBuilderTest.php b/test/HTML5/Parser/DOMTreeBuilderTest.php index b2a2d39..d0bea5f 100644 --- a/test/HTML5/Parser/DOMTreeBuilderTest.php +++ b/test/HTML5/Parser/DOMTreeBuilderTest.php @@ -100,7 +100,7 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase $this->assertSame($doc, $targetDom); $this->assertEquals('html', $doc->documentElement->tagName); } - + public function testDocumentFakeAttrAbsence() { $html = "<!DOCTYPE html><html xmlns=\"http://www.w3.org/1999/xhtml\"><body>foo</body></html>"; @@ -495,6 +495,12 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase $this->assertEmpty($this->errors); $noscript = $doc->getElementsByTagName('noscript')->item(0); $this->assertEquals('noscript', $noscript->tagName); + + $html = '<!DOCTYPE html><html><body><noscript><p>No JS</p></noscript></body></html>'; + $doc = $this->parse($html); + $this->assertEmpty($this->errors); + $p = $doc->getElementsByTagName('p')->item(0); + $this->assertEquals('p', $p->tagName); } /** |