From 8f95f4ad58b96a7116083c847b247348ade279a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=A1o=20Belica?= Date: Fri, 21 Feb 2014 11:31:44 +0100 Subject: 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. --- test/HTML5/Parser/TokenizerTest.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'test/HTML5/Parser/TokenizerTest.php') 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. "" => array('foo', array('a' => 'blue&red'), FALSE), "" => array('foo', array('a' => 'blue&&&red'), FALSE), - '' => array('foo', array('b"' => 'baz'), FALSE), '' => array('foo', array('bar' => NULL), FALSE), '' => 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 + '' => array('foo', array(), FALSE), + '' => array('foo', array(), FALSE), + '' => array('foo', array(), FALSE), + '' => array('foo', array(), FALSE), + ); foreach ($bad as $test => $expects) { $events = $this->parse($test); -- cgit v1.2.3