Open
Description
Consider this:
<html>Hello, This is a test.<br />Does it work this time?</html>
Imo, this is valid HTML and it is also parsed correctly by DOMDocument. However, HTML5 parser will ignore the first line of text. We're using loadHTML() method.
Even this one works with DOMDocument:
Hello, This is a test.<br />Does it work this time?
According to Mozilla documentation:
- html: The start tag may be omitted if the first thing inside the element is not a comment.
- body: The start tag may be omitted if the first thing inside it is not a space character, comment, <script> element or <style> element.
Reference: roundcube/roundcubemail#6713 (comment)