We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The parser fails when it encounters a tag name with strange capitalisation (e.g. <Title>, <titlE>, etc). For example, this script
<Title>
<titlE>
<?php require_once __DIR__ . "/vendor/autoload.php"; $html = <<< 'HERE' <!doctype html> <html> <head> <Title>Hello, world!</Title> </head> <body></body> </html> HERE; $parser = new Masterminds\HTML5; $dom = $parser->loadHTML( $html ); echo "== HTML5 rendering ==\n"; echo $parser->saveHTML( $dom ); echo "== XPath queries ==\n"; $xpath = new DOMXPath( $dom ); $xpath->registerNamespace( "x", "http://www.w3.org/1999/xhtml" ); echo "=== Value of <title> ===\n"; echo $xpath->query( "//x:title" )->item( 0 )->nodeValue;
outputs:
== HTML5 rendering == <!DOCTYPE html> <html><head> <title>Hello, world!</Title> </head> <body></body> </html></title></head></html> == XPath queries == === Value of <title> === Hello, world!</Title> </head> <body></body>
The HTML supplied is valid.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
The parser fails when it encounters a tag name with strange capitalisation (e.g.
<Title>
,<titlE>
, etc). For example, this scriptoutputs:
The HTML supplied is valid.
The text was updated successfully, but these errors were encountered: