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
fix(core): meta addTag() adds incorrect attribute #32531
Conversation
I'm not sure if this is a good approach. We should either transform all |
@lazarljubenovic agreed, I was expecting something similar to a map before looking into this implementation. But turned out that was not the approach, if users should be held incharge then I think we should drop |
But removing |
Hmm, I guess that would be a breaking change indeed, since it would change this part of the public API: angular/packages/platform-browser/src/browser/meta.ts Lines 17 to 27 in bfa0109
But currently it misleads the developer by suggesting So, in my opinion, the proper solution to the bug (while avoiding breaking changes) is to introduce a mapping object where it will be easy to later edit keys and add new ones, such as this one.
Then if the attribute's key is not present in the map, assume that the key of And since this... angular/packages/platform-browser/src/browser/meta.ts Lines 24 to 27 in bfa0109
...exists, the developer can always add custom attributes by specifying the dash himself. |
@lazarljubenovic I am gonna go with the approach you suggested as it is cleaner and does not introduce a breaking change. |
bfa0109
to
4b01d15
Compare
Meta::addTag() adds a meta tag with httpEquiv attribute instead of http-equiv when MetaDefinition contains httpEquiv property.
Meta::addTag() adds a meta tag with httpEquiv attribute instead of http-equiv when MetaDefinition contains httpEquiv property. PR Close #32531
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Meta::addTag() adds a meta tag with httpEquiv instead of http-equiv when
MetaDefinition contains httpEquiv property.
closes #31525
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Currently when we use the addTag() or addTags() method with a MetaDefinition containing httpEquiv property a meta tag with an incorrect attribute httpequiv will be added instead of the correct http-equiv attribute.
Issue Number: #31525
What is the new behavior?
The changes will add meta tags with the correct attribute.
Does this PR introduce a breaking change?
Other information
Creating this PR instead of an old one that I messed up while fixing a conflict: #31542