technosophos / querypath

QueryPath is a PHP library for manipulating XML and HTML. It is designed to work not only with local files, but also with web services and database resources.
http://querypath.org
Other
823 stars 115 forks source link

HTML5: DOMQuery should use HTML5 parser #114

Open technosophos opened 11 years ago

technosophos commented 11 years ago

The following functions need to be updated for HTML5 parsing and serializing.

And need to add...

ptz-nerf commented 8 years ago

Hello! So, there is no way to insert a node with empty attribute? For example, I got error trying to replace node with iframe with allowfullscreen attribute without value (embed code for yotube):

$node->replaceWith($iframeHtml);
DOMDocumentFragment::appendXML(): Entity: line 6: parser error : Specification mandate value for attribute allowfullscreen 

P.S. : Using html5qp().

technosophos commented 8 years ago

This looks like a big with HTML5-PHP. It is not allowing an empty attribute value for that attribute.

On Sat, Jan 23, 2016, 11:32 AM Sergei notifications@github.com wrote:

Hello! So, there is no way to insert a node with empty attribute? For example, I got error trying to replace node with iframe with allowfullscreen attribute without value (embed code for yotube):

$node->replaceWith($iframeHtml);

DOMDocumentFragment::appendXML(): Entity: line 6: parser error : Specification mandate value for attribute allowfullscreen

P.S. : Using html5qp().

— Reply to this email directly or view it on GitHub https://github.com/technosophos/querypath/issues/114#issuecomment-174210748 .