X Tutup
Skip to content

HtmlParser: self-closing and void elements handling ** BREAKING **#5591

Closed
vicb wants to merge 2 commits intoangular:masterfrom
vicb:1203-selfClosing
Closed

HtmlParser: self-closing and void elements handling ** BREAKING **#5591
vicb wants to merge 2 commits intoangular:masterfrom
vicb:1203-selfClosing

Conversation

@vicb
Copy link
Copy Markdown
Contributor

@vicb vicb commented Dec 4, 2015

see individual commit messages for more details

/cc @IgorMinar @jelbourn @pkozlowski-opensource @tbosch

@vicb vicb added feature Label used to distinguish feature request from other issues action: review The PR is still awaiting reviews from at least one requested reviewer P2: required labels Dec 4, 2015
@vicb vicb force-pushed the 1203-selfClosing branch 2 times, most recently from bb9cc2c to 59ae442 Compare December 4, 2015 00:52
@IgorMinar IgorMinar added this to the beta.0 milestone Dec 4, 2015
@pkozlowski-opensource
Copy link
Copy Markdown
Member

I just went through the tests and the behavior looks good to me.

@IgorMinar IgorMinar changed the title HtmlParser: slef closing and void elements handling ** BREAKING ** HtmlParser: self-closing and void elements handling ** BREAKING ** Dec 4, 2015
@tbosch tbosch added pr_state: LGTM action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 4, 2015
BREAKING CHANGE

End tags used to be tolerated for void elements with no content.
They are no more allowed so that we more closely follow the HTML5 spec.
@vicb vicb force-pushed the 1203-selfClosing branch from 59ae442 to f86861a Compare December 4, 2015 18:21
BREAKING CHANGE:

`<whatever />` used to be expanded to `<whatever></whatever>`.
The parser now follows the HTML5 spec more closely.
Only void and foreign elements can be self closed.
@vicb vicb force-pushed the 1203-selfClosing branch from f86861a to fea6f30 Compare December 4, 2015 19:30
@vicb vicb added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Dec 4, 2015
@mary-poppins
Copy link
Copy Markdown

Merging PR #5591 on behalf of @jelbourn to branch presubmit-jelbourn-pr-5591.

@e-oz
Copy link
Copy Markdown

e-oz commented Dec 5, 2015

Can you please add couple examples of what is not allowed now, what was allowed before (and why)?

@IgorMinar
Copy link
Copy Markdown
Contributor

Only valid Html5 is allowed
On Fri, Dec 4, 2015 at 7:11 PM Evgeniy OZ notifications@github.com wrote:

Can you please add couple examples of what is not allowed now, what was
allowed before (and why)?


Reply to this email directly or view it on GitHub
#5591 (comment).

@jelbourn
Copy link
Copy Markdown
Contributor

jelbourn commented Dec 5, 2015

@e-oz Basically anything that is invalid HTML is now disallowed:

NOT ALLOWED
<div />
<custom-thing />
<input></input>
<img ...></img>

@vicb vicb deleted the 1203-selfClosing branch June 23, 2016 17:44
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes feature Label used to distinguish feature request from other issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

X Tutup