Skip to content
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

Allow brackets in attributes name #727

Merged
merged 2 commits into from Jul 24, 2019

Conversation

martindybal
Copy link
Contributor

I need to use AMP Bind component. So I have to allow brackets in attribute name

<button [text]="'This is a attribute with special characters ' + (show ? 'true': 'false')">Show</button>

@tomasherceg
Copy link
Member

The ReadIdentifier method is used to parse also the tag and directive names - this change will allow these characters in directives and tag names. I can live with that, but we should check if there aren't any other side effects of this change.

@tomasherceg
Copy link
Member

I have modified the code so we'll avoid the breaking change in tag and directive names.
Interestingly, the HTML specs doesn't allow brackets or any other non-alphanumeric characters in HTML tag names (which is OK for us as we translate tags with these characters to plain HTML tags), but the attribute names allow almost everything (which means that our list is more restrictive than the specs).

But if the tests pass, I think we can merge this.

@tomasherceg tomasherceg merged commit a8ccdab into master Jul 24, 2019
@tomasherceg tomasherceg deleted the feature/allow-brackets-in-attribute-name branch July 24, 2019 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants