diff options
author | Mišo Belica <[email protected]> | 2014-02-21 11:31:44 +0100 |
---|---|---|
committer | Mišo Belica <[email protected]> | 2014-02-21 11:31:44 +0100 |
commit | 8f95f4ad58b96a7116083c847b247348ade279a7 (patch) | |
tree | 64fbdd7be8867085ca01a3b506650f0577fbd03f /test/HTML5/Parser/TokenizerTest.php | |
parent | 95f3cf8d5735498e5de26cd81babecd076e4d6bd (diff) |
Ignore attributes with illegal chars in name (fixes #23)
This is neccesary because method "DOMElement::setAttribute"
throws exception for wrong names so DOM elements
can't contain these attributes.
Diffstat (limited to 'test/HTML5/Parser/TokenizerTest.php')
-rw-r--r-- | test/HTML5/Parser/TokenizerTest.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/HTML5/Parser/TokenizerTest.php b/test/HTML5/Parser/TokenizerTest.php index 3d100e7..2a111bc 100644 --- a/test/HTML5/Parser/TokenizerTest.php +++ b/test/HTML5/Parser/TokenizerTest.php @@ -363,11 +363,18 @@ class TokenizerTest extends \HTML5\Tests\TestCase { // This will emit an entity lookup failure for &red. "<foo a='blue&red'>" => array('foo', array('a' => 'blue&red'), FALSE), "<foo a='blue&&&red'>" => array('foo', array('a' => 'blue&&&red'), FALSE), - '<foo b"="baz">' => array('foo', array('b"' => 'baz'), FALSE), '<foo bar=>' => array('foo', array('bar' => NULL), FALSE), '<foo bar="oh' => array('foo', array('bar' => 'oh'), FALSE), '<foo bar=oh">' => array('foo', array('bar' => 'oh"'), FALSE), + // these attributes are ignored because of current implementation + // of method "DOMElement::setAttribute" + // see issue #23: https://github.com/Masterminds/html5-php/issues/23 + '<foo b"="baz">' => array('foo', array(), FALSE), + '<foo 2abc="baz">' => array('foo', array(), FALSE), + '<foo ?="baz">' => array('foo', array(), FALSE), + '<foo foo?bar="baz">' => array('foo', array(), FALSE), + ); foreach ($bad as $test => $expects) { $events = $this->parse($test); |