-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML API: Handle input tags #5907
Changes from all commits
fcf8b09
eda7f44
75af054
7d273dd
c651133
60a1af7
fee724f
dbf9831
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,18 +101,18 @@ | |
* | ||
* - Containers: ADDRESS, BLOCKQUOTE, DETAILS, DIALOG, DIV, FOOTER, HEADER, MAIN, MENU, SPAN, SUMMARY. | ||
* - Custom elements: All custom elements are supported. :) | ||
* - Form elements: BUTTON, DATALIST, FIELDSET, LABEL, LEGEND, METER, PROGRESS, SEARCH. | ||
* - Form elements: BUTTON, DATALIST, FIELDSET, INPUT, LABEL, LEGEND, METER, PROGRESS, SEARCH. | ||
* - Formatting elements: B, BIG, CODE, EM, FONT, I, PRE, SMALL, STRIKE, STRONG, TT, U, WBR. | ||
* - Heading elements: H1, H2, H3, H4, H5, H6, HGROUP. | ||
* - Links: A. | ||
* - Lists: DD, DL, DT, LI, OL, LI. | ||
* - Media elements: AUDIO, CANVAS, EMBED, FIGCAPTION, FIGURE, IMG, MAP, PARAM, PICTURE, SOURCE, VIDEO, TRACK. | ||
* - Lists: DD, DL, DT, LI, OL, UL. | ||
* - Media elements: AUDIO, CANVAS, EMBED, FIGCAPTION, FIGURE, IMG, MAP, PICTURE, SOURCE, TRACK, VIDEO. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PARAM moved to deprecated. TRACK/VIDEO alphabetized. |
||
* - Paragraph: BR, P. | ||
* - Phrasing elements: AREA, ABBR, BDI, BDO, CITE, DATA, DEL, DFN, INS, MARK, OUTPUT, Q, SAMP, SUB, SUP, TIME, VAR. | ||
* - Phrasing elements: ABBR, AREA, BDI, BDO, CITE, DATA, DEL, DFN, INS, MARK, OUTPUT, Q, SAMP, SUB, SUP, TIME, VAR. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alphabetized. |
||
* - Sectioning elements: ARTICLE, ASIDE, HR, NAV, SECTION. | ||
* - Templating elements: SLOT. | ||
* - Text decoration: RUBY. | ||
* - Deprecated elements: ACRONYM, BLINK, CENTER, DIR, ISINDEX, KEYGEN, LISTING, MULTICOL, NEXTID, SPACER. | ||
* - Deprecated elements: ACRONYM, BLINK, CENTER, DIR, ISINDEX, KEYGEN, LISTING, MULTICOL, NEXTID, PARAM, SPACER. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PARAM is deprecated. |
||
* | ||
* ### Supported markup | ||
* | ||
|
@@ -972,6 +972,23 @@ private function step_in_body() { | |
$this->state->frameset_ok = false; | ||
return true; | ||
|
||
/* | ||
* > A start tag whose tag name is "input" | ||
*/ | ||
case '+INPUT': | ||
$this->reconstruct_active_formatting_elements(); | ||
$this->insert_html_element( $this->state->current_token ); | ||
$type_attribute = $this->get_attribute( 'type' ); | ||
/* | ||
* > If the token does not have an attribute with the name "type", or if it does, | ||
* > but that attribute's value is not an ASCII case-insensitive match for the | ||
* > string "hidden", then: set the frameset-ok flag to "not ok". | ||
*/ | ||
if ( ! is_string( $type_attribute ) || 'hidden' !== strtolower( $type_attribute ) ) { | ||
$this->state->frameset_ok = false; | ||
} | ||
return true; | ||
|
||
/* | ||
* > A start tag whose tag name is "hr" | ||
*/ | ||
|
@@ -1024,7 +1041,6 @@ private function step_in_body() { | |
case 'HEAD': | ||
case 'HTML': | ||
case 'IFRAME': | ||
case 'INPUT': | ||
case 'LINK': | ||
case 'MARQUEE': | ||
case 'MATH': | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#5539 (comment)