HTML API: Cleanup tests and list of void elements.
This patch adds newly supported elements to tests that should have been updated in recent PRs, but which were merged without that. Those PRs removed failing tests showing that the elements were unsupported, but did not add the elements to the list of supported ones. It also removes some elements from the special-exclusion list of unsupported IN BODY elements. These did not present in failing tests because earlier conditions in the switch structure caught the tags before hitting the default block. Finally it adds some missing elements to the list of void elements. These elements are not listed as void in the HTML specification because they are deprecated. However, they are treated as void for the sake of HTML serialization and the parsing rules indicate that they behave as void elements, so it's safe to list them within the HTML API as void. Developed in WordPress/wordpress-develop#5913 Fixes #60307 Built from https://develop.svn.wordpress.org/trunk@57319 git-svn-id: http://core.svn.wordpress.org/trunk@56825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2ce808cc7f
commit
1d4b95336a
|
@ -1002,7 +1002,6 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
||||||
*/
|
*/
|
||||||
switch ( $tag_name ) {
|
switch ( $tag_name ) {
|
||||||
case 'APPLET':
|
case 'APPLET':
|
||||||
case 'AREA':
|
|
||||||
case 'BASE':
|
case 'BASE':
|
||||||
case 'BASEFONT':
|
case 'BASEFONT':
|
||||||
case 'BGSOUND':
|
case 'BGSOUND':
|
||||||
|
@ -1010,8 +1009,6 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
||||||
case 'CAPTION':
|
case 'CAPTION':
|
||||||
case 'COL':
|
case 'COL':
|
||||||
case 'COLGROUP':
|
case 'COLGROUP':
|
||||||
case 'DD':
|
|
||||||
case 'DT':
|
|
||||||
case 'FORM':
|
case 'FORM':
|
||||||
case 'FRAME':
|
case 'FRAME':
|
||||||
case 'FRAMESET':
|
case 'FRAMESET':
|
||||||
|
@ -1019,7 +1016,6 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
||||||
case 'HTML':
|
case 'HTML':
|
||||||
case 'IFRAME':
|
case 'IFRAME':
|
||||||
case 'INPUT':
|
case 'INPUT':
|
||||||
case 'LI':
|
|
||||||
case 'LINK':
|
case 'LINK':
|
||||||
case 'MARQUEE':
|
case 'MARQUEE':
|
||||||
case 'MATH':
|
case 'MATH':
|
||||||
|
@ -1029,7 +1025,6 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
||||||
case 'NOFRAMES':
|
case 'NOFRAMES':
|
||||||
case 'NOSCRIPT':
|
case 'NOSCRIPT':
|
||||||
case 'OBJECT':
|
case 'OBJECT':
|
||||||
case 'OL':
|
|
||||||
case 'OPTGROUP':
|
case 'OPTGROUP':
|
||||||
case 'OPTION':
|
case 'OPTION':
|
||||||
case 'PARAM':
|
case 'PARAM':
|
||||||
|
@ -1055,7 +1050,6 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
||||||
case 'TITLE':
|
case 'TITLE':
|
||||||
case 'TR':
|
case 'TR':
|
||||||
case 'TRACK':
|
case 'TRACK':
|
||||||
case 'UL':
|
|
||||||
case 'XMP':
|
case 'XMP':
|
||||||
$this->last_error = self::ERROR_UNSUPPORTED;
|
$this->last_error = self::ERROR_UNSUPPORTED;
|
||||||
throw new WP_HTML_Unsupported_Exception( "Cannot process {$tag_name} element." );
|
throw new WP_HTML_Unsupported_Exception( "Cannot process {$tag_name} element." );
|
||||||
|
@ -1709,15 +1703,19 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
||||||
return (
|
return (
|
||||||
'AREA' === $tag_name ||
|
'AREA' === $tag_name ||
|
||||||
'BASE' === $tag_name ||
|
'BASE' === $tag_name ||
|
||||||
|
'BASEFONT' === $tag_name || // Obsolete but still treated as void.
|
||||||
|
'BGSOUND' === $tag_name || // Obsolete but still treated as void.
|
||||||
'BR' === $tag_name ||
|
'BR' === $tag_name ||
|
||||||
'COL' === $tag_name ||
|
'COL' === $tag_name ||
|
||||||
'EMBED' === $tag_name ||
|
'EMBED' === $tag_name ||
|
||||||
|
'FRAME' === $tag_name ||
|
||||||
'HR' === $tag_name ||
|
'HR' === $tag_name ||
|
||||||
'IMG' === $tag_name ||
|
'IMG' === $tag_name ||
|
||||||
'INPUT' === $tag_name ||
|
'INPUT' === $tag_name ||
|
||||||
'LINK' === $tag_name ||
|
'LINK' === $tag_name ||
|
||||||
'KEYGEN' === $tag_name || // Obsolete but still treated as void.
|
'KEYGEN' === $tag_name || // Obsolete but still treated as void.
|
||||||
'META' === $tag_name ||
|
'META' === $tag_name ||
|
||||||
|
'PARAM' === $tag_name || // Obsolete but still treated as void.
|
||||||
'SOURCE' === $tag_name ||
|
'SOURCE' === $tag_name ||
|
||||||
'TRACK' === $tag_name ||
|
'TRACK' === $tag_name ||
|
||||||
'WBR' === $tag_name
|
'WBR' === $tag_name
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.5-alpha-57318';
|
$wp_version = '6.5-alpha-57319';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue