Skip to content

Commit

Permalink
HTML API: Parse DOCTYPE tokens and set HTML parser mode accordingly.
Browse files Browse the repository at this point in the history
This patch adds until-now missing code to parse the structure of HTML DOCTYPE declarations. The DOCTYPE is mostly unused but can dictate the document compatability mode, which governs whether CSS class names match in a ASCII-case-insensitive way or not, and whether TABLE elements close an open P element.

The DOCTYPE information is made available through a new method on the Tag Processor, `get_doctype_info()`.

Developed in WordPress/wordpress-develop#7195
Discussed in https://core.trac.wordpress.org/ticket/61576

Props dmsnell, jonsurrell.
See #61576.

Built from https://develop.svn.wordpress.org/trunk@58925


git-svn-id: http://core.svn.wordpress.org/trunk@58321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
dmsnell committed Aug 23, 2024
1 parent 83c2045 commit e3a3c13
Show file tree
Hide file tree
Showing 5 changed files with 645 additions and 9 deletions.
Loading

0 comments on commit e3a3c13

Please sign in to comment.