mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-12 08:34:35 +00:00
HTML API: Add support for HR element.
Adds support for the following HTML elements to the HTML Processor: - HR Previously, this element was not supported and the HTML Processor would bail when encountering it. Now, with this patch, it will proceed to parse an HTML document when encountering one. Developed in WordPress/wordpress-develop#5897 Props jonsurrell, dmsnell Fixes #60283 git-svn-id: https://develop.svn.wordpress.org/trunk@57314 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -109,7 +109,7 @@
|
||||
* - Media elements: AUDIO, CANVAS, FIGCAPTION, FIGURE, IMG, MAP, PICTURE, VIDEO.
|
||||
* - Paragraph: P.
|
||||
* - Phrasing elements: ABBR, BDI, BDO, CITE, DATA, DEL, DFN, INS, MARK, OUTPUT, Q, SAMP, SUB, SUP, TIME, VAR.
|
||||
* - Sectioning elements: ARTICLE, ASIDE, NAV, SECTION.
|
||||
* - Sectioning elements: ARTICLE, ASIDE, HR, NAV, SECTION.
|
||||
* - Templating elements: SLOT.
|
||||
* - Text decoration: RUBY.
|
||||
* - Deprecated elements: ACRONYM, BLINK, CENTER, DIR, ISINDEX, MULTICOL, NEXTID, SPACER.
|
||||
@@ -941,6 +941,17 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
||||
$this->reconstruct_active_formatting_elements();
|
||||
$this->insert_html_element( $this->state->current_token );
|
||||
return true;
|
||||
|
||||
/*
|
||||
* > A start tag whose tag name is "hr"
|
||||
*/
|
||||
case '+HR':
|
||||
if ( $this->state->stack_of_open_elements->has_p_in_button_scope() ) {
|
||||
$this->close_a_p_element();
|
||||
}
|
||||
$this->insert_html_element( $this->state->current_token );
|
||||
$this->state->frameset_ok = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -977,7 +988,6 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
||||
case 'FRAME':
|
||||
case 'FRAMESET':
|
||||
case 'HEAD':
|
||||
case 'HR':
|
||||
case 'HTML':
|
||||
case 'IFRAME':
|
||||
case 'INPUT':
|
||||
|
||||
Reference in New Issue
Block a user