Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/wp-includes/html-api/class-wp-html-processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -1002,24 +1002,20 @@ private function step_in_body() {
*/
switch ( $tag_name ) {
case 'APPLET':
case 'AREA':
case 'BASE':
case 'BASEFONT':
case 'BGSOUND':
case 'BODY':
case 'CAPTION':
case 'COL':
case 'COLGROUP':
case 'DD':
case 'DT':
case 'FORM':
case 'FRAME':
case 'FRAMESET':
case 'HEAD':
case 'HTML':
case 'IFRAME':
case 'INPUT':
case 'LI':
case 'LINK':
case 'MARQUEE':
case 'MATH':
Expand All @@ -1029,7 +1025,6 @@ private function step_in_body() {
case 'NOFRAMES':
case 'NOSCRIPT':
case 'OBJECT':
case 'OL':
case 'OPTGROUP':
case 'OPTION':
case 'PARAM':
Expand All @@ -1055,7 +1050,6 @@ private function step_in_body() {
case 'TITLE':
case 'TR':
case 'TRACK':
case 'UL':
case 'XMP':
$this->last_error = self::ERROR_UNSUPPORTED;
throw new WP_HTML_Unsupported_Exception( "Cannot process {$tag_name} element." );
Expand Down Expand Up @@ -1709,15 +1703,19 @@ public static function is_void( $tag_name ) {
return (
'AREA' === $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 ||
'COL' === $tag_name ||
'EMBED' === $tag_name ||
'FRAME' === $tag_name ||
'HR' === $tag_name ||
'IMG' === $tag_name ||
'INPUT' === $tag_name ||
'LINK' === $tag_name ||
'KEYGEN' === $tag_name || // Obsolete but still treated as void.
'META' === $tag_name ||
'PARAM' === $tag_name || // Obsolete but still treated as void.
'SOURCE' === $tag_name ||
'TRACK' === $tag_name ||
'WBR' === $tag_name
Expand Down
14 changes: 10 additions & 4 deletions tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function data_single_tag_of_supported_elements() {
'ABBR',
'ACRONYM', // Neutralized.
'ADDRESS',
'AREA',
'ARTICLE',
'ASIDE',
'AUDIO',
Expand All @@ -48,6 +49,7 @@ public function data_single_tag_of_supported_elements() {
'BDO',
'BIG',
'BLINK', // Deprecated.
'BR',
'BUTTON',
'CANVAS',
'CENTER', // Neutralized.
Expand All @@ -65,6 +67,7 @@ public function data_single_tag_of_supported_elements() {
'DL',
'DT',
'EM',
'EMBED',
'FIELDSET',
'FIGCAPTION',
'FIGURE',
Expand All @@ -78,22 +81,25 @@ public function data_single_tag_of_supported_elements() {
'H6',
'HEADER',
'HGROUP',
'HR',
'I',
'IMG',
'INS',
'LI',
'ISINDEX', // Deprecated
'ISINDEX', // Deprecated.
'KBD',
'KEYGEN', // Deprecated.
'LABEL',
'LEGEND',
'LISTING', // Deprecated.
'MAIN',
'MAP',
'MARK',
'MENU',
'METER',
'MULTICOL', // Deprecated
'MULTICOL', // Deprecated.
'NAV',
'NEXTID', // Deprecated
'NEXTID', // Deprecated.
'OL',
'OUTPUT',
'P',
Expand All @@ -106,7 +112,7 @@ public function data_single_tag_of_supported_elements() {
'SECTION',
'SLOT',
'SMALL',
'SPACER', // Deprecated
'SPACER', // Deprecated.
'SPAN',
'STRIKE',
'STRONG',
Expand Down