Invalid parsing result when head/body tag is missing
まだ誰も着手していません。
評価
調査の方向性
まず、loadHTML() を通じて2つの例を再現し、HTML5 パーサーの結果を DOMDocument と比較します。リンク先の Mozilla のルールを期待される動作として使用し、省略された html および body の開始タグをパーサーのパスがどのように処理するかを確認します。両方の例で br 要素の前後のテキストが保持され、回帰テストのカバレッジがあることが完了条件です。
索引モデルが issue の本文から書いたものです。
説明
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: https://github.com/roundcube/roundcubemail/issues/6713#issuecomment-480320339
- 主要言語
- HTML
- スター
- 1.8k
- フォーク
- 122
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Masterminds/html5-php のほかの issue
-
help-wanted
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
Masterminds/html5-php#252 · コメント 1 件 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
Masterminds/html5-php#251 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
Masterminds/html5-php#250 · コメント 5 件 · リアクション 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
Masterminds/html5-php#246 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
Masterminds/html5-php#245 · コメント 1 件 ·
Masterminds/html5-php の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
area/profiles comp/cli comp/dashboard P2 sweeper:risk-session-state type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NousResearch/hermes-agent#122365 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
vllm-project/production-stack#1105 ·
-
bug priority:low
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
CyberAgent/psd2svg#430 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100