diff options
author | Matt Butcher <[email protected]> | 2014-02-21 09:42:49 -0700 |
---|---|---|
committer | Matt Butcher <[email protected]> | 2014-02-21 09:42:49 -0700 |
commit | c3ac1b36c0fab25eff589b19b35b55a229ca8ec4 (patch) | |
tree | 64fbdd7be8867085ca01a3b506650f0577fbd03f /test/HTML5 | |
parent | 4b3da0978f5a77d4ac45daf3fb04fbe438701fe6 (diff) | |
parent | 8f95f4ad58b96a7116083c847b247348ade279a7 (diff) |
Merge pull request #29 from miso-belica/fix-wrong-attr-names
Ignore attributes with illegal characters in name
Diffstat (limited to 'test/HTML5')
-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); |