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

Consider adding the HTML entities from w3scools #5546

Closed
Tragetaschen opened this Issue Dec 2, 2015 · 10 comments

Comments

Projects
None yet
5 participants
@Tragetaschen
Contributor

Tragetaschen commented Dec 2, 2015

I picked up 2.0.0-alpha.47 and immediately stumbled over en exception that © was an unknown entity, but w3scools as the top link of a search contained that entity.

Consider adding at least those entities from w3schools to the list

@PascalPrecht

This comment has been minimized.

Show comment
Hide comment
@PascalPrecht

PascalPrecht Dec 2, 2015

Contributor

@Tragetaschen could you provide a plunk that demonstrates the error?

How about sending a PR to fix this? :)

Contributor

PascalPrecht commented Dec 2, 2015

@Tragetaschen could you provide a plunk that demonstrates the error?

How about sending a PR to fix this? :)

@Tragetaschen

This comment has been minimized.

Show comment
Hide comment
@Tragetaschen

Tragetaschen Dec 2, 2015

Contributor

Whoops, I just realized the error message actually contains the hint…

Contributor

Tragetaschen commented Dec 2, 2015

Whoops, I just realized the error message actually contains the hint…

@Tragetaschen

This comment has been minimized.

Show comment
Hide comment
@Tragetaschen

Tragetaschen Dec 2, 2015

Contributor

Going through my application, I stumble upon more occurrences. This is a rather frustrating uphill battle :-/

Plunkr: http://plnkr.co/edit/aWRgOIg6cGhrgeXVxcut?p=preview

I really get the argument for keeping the list and thus the file size small, but I also have to tell my web designer colleague that he cannot use the HTML entities he knows.

Contributor

Tragetaschen commented Dec 2, 2015

Going through my application, I stumble upon more occurrences. This is a rather frustrating uphill battle :-/

Plunkr: http://plnkr.co/edit/aWRgOIg6cGhrgeXVxcut?p=preview

I really get the argument for keeping the list and thus the file size small, but I also have to tell my web designer colleague that he cannot use the HTML entities he knows.

@PascalPrecht

This comment has been minimized.

Show comment
Hide comment
@PascalPrecht

PascalPrecht Dec 2, 2015

Contributor

Correct:

Unknown entity "copy" - use the "&#<decimal>;" or  "&#x<hex>;" syntax ("<div>[ERROR ->]&copy;&euro;&times;</div>")

says that you need to use either the decimal or hexadecimal representation of the html entity. I'm sure there's a reason why alphabetic representations aren't supported. Angular has now its own HTML parser, maybe this is to support more entities instead of maintaining all possible alphabetic version.

Maybe @vsavkin can tell what the reasoning is.

Contributor

PascalPrecht commented Dec 2, 2015

Correct:

Unknown entity "copy" - use the "&#<decimal>;" or  "&#x<hex>;" syntax ("<div>[ERROR ->]&copy;&euro;&times;</div>")

says that you need to use either the decimal or hexadecimal representation of the html entity. I'm sure there's a reason why alphabetic representations aren't supported. Angular has now its own HTML parser, maybe this is to support more entities instead of maintaining all possible alphabetic version.

Maybe @vsavkin can tell what the reasoning is.

@jnizet

This comment has been minimized.

Show comment
Hide comment
@jnizet

jnizet Dec 3, 2015

Contributor

I just had that problem too. I understand that this looks to be a feature and not a bug, but it is very disappointing.

Angular is supposed to be "HTML enhanced for web apps!", and this clearly does not enhance HTML.

Not only &times; or &quot; are valid HTML, but they're also much easier to remember, read, understand and maintain than &#215; and &#34;.

So, I just hope this is a temporary limitation, and not a final feature. Can anyone from the team confirm?

Contributor

jnizet commented Dec 3, 2015

I just had that problem too. I understand that this looks to be a feature and not a bug, but it is very disappointing.

Angular is supposed to be "HTML enhanced for web apps!", and this clearly does not enhance HTML.

Not only &times; or &quot; are valid HTML, but they're also much easier to remember, read, understand and maintain than &#215; and &#34;.

So, I just hope this is a temporary limitation, and not a final feature. Can anyone from the team confirm?

@vicb

This comment has been minimized.

Show comment
Hide comment
@vicb

vicb Dec 3, 2015

Contributor

The reasoning is that we want to keep the parser size reasonable. The table of all entities would probably be bigger than the parser itself.

That being said, we are open to adding the most common ones.

Contributor

vicb commented Dec 3, 2015

The reasoning is that we want to keep the parser size reasonable. The table of all entities would probably be bigger than the parser itself.

That being said, we are open to adding the most common ones.

@pkozlowski-opensource

This comment has been minimized.

Show comment
Hide comment
@pkozlowski-opensource

pkozlowski-opensource Dec 3, 2015

Member

That being said, we are open to adding the most common ones.

Awesome, this is what i wanted to suggest 👍

And as soon as we gain offline compilation super-powers the parser size will be less of a concern

Member

pkozlowski-opensource commented Dec 3, 2015

That being said, we are open to adding the most common ones.

Awesome, this is what i wanted to suggest 👍

And as soon as we gain offline compilation super-powers the parser size will be less of a concern

@PascalPrecht

This comment has been minimized.

Show comment
Hide comment
@PascalPrecht

PascalPrecht Dec 3, 2015

Contributor

Yes, sounds very good to me too! Although "most common ones" can be very relative to everyone. How can we get stats about this?

Contributor

PascalPrecht commented Dec 3, 2015

Yes, sounds very good to me too! Although "most common ones" can be very relative to everyone. How can we get stats about this?

@vicb

This comment has been minimized.

Show comment
Hide comment
@vicb

vicb Dec 3, 2015

Contributor

I'm creating a list based on wikipedia + some other sources, hopefully it will be good enough.

Contributor

vicb commented Dec 3, 2015

I'm creating a list based on wikipedia + some other sources, hopefully it will be good enough.

@Tragetaschen

This comment has been minimized.

Show comment
Hide comment
@Tragetaschen

Tragetaschen Dec 3, 2015

Contributor

Yay! I skimmed through the list and found the entities I missed before.

Contributor

Tragetaschen commented Dec 3, 2015

Yay! I skimmed through the list and found the entities I missed before.

JohannesHoppe added a commit to angular-buch/angular2-testing that referenced this issue Dec 6, 2015

fix due to downgrade: &euro; not working in alpha-47, see angular/ang…
…ular#5546

TODO:
- fixed in alpha-48, revert again when upgrading to alpha-48+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment