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 is confused if you add whitespaces into </title>, like:
</title>
<title>Note the space after "title"</title > <title>Another example<title >
Both examples above are valid according to the W3 Validator.
This behaviour is caused by Tokenizer.php which assumes the end tag is always exactly </title>.
<?php require_once __DIR__ . "/vendor/autoload.php"; $html = <<<EOF <!doctype html> <html> <head> <title>This is valid, really.</title > </head> <body></body> </html> EOF; $parser = new Masterminds\HTML5; $dom = $parser->loadHTML( $html ); echo $parser->saveHTML( $dom );
<!DOCTYPE html> <html><head> <title>This is valid, really.</title > </head> <body></body> </html></title></head></html>
The text was updated successfully, but these errors were encountered:
Allow whitespaces in RCDATA end tags
98e80dd
Fixes Masterminds#75 Signed-off-by: Zhaofeng Li <hello@zhaofeng.li>
7c1c7df
This looks good to me. Good catch. And thanks for including the tests.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
The parser is confused if you add whitespaces into
</title>
, like:Both examples above are valid according to the W3 Validator.
This behaviour is caused by Tokenizer.php which assumes the end tag is always exactly
</title>
.Test script
Output
Real-world examples
The text was updated successfully, but these errors were encountered: