technosophos/querypath

HTML5: DOMQuery should use HTML5 parser

technosophos opened this issue · 2 comments

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

  • parseXML
  • parseXMLFile
  • innerHTML
  • html()
  • writeHTML()
  • append()
  • prepend()
  • QueryPath::withHTML
  • htmlqp()

And need to add...

  • Documentation on use_parser=html5
  • html5qp() ?
  • html5()
  • writeHTML5()

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().

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
#114 (comment)
.