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

$ is a valid js identifier character #81

Open
colinmacc opened this issue May 14, 2012 · 2 comments
Open

$ is a valid js identifier character #81

colinmacc opened this issue May 14, 2012 · 2 comments

Comments

@colinmacc
Copy link

And therefore parseBindStr's match regexp must be regex = /([a-zA-Z0-9$-]+)(?:[\s=]+([a-zA-Z0-9$_-]+))?/,

@tristanls
Copy link
Collaborator

I took a look at this. Attempting to put $ into attributes results in: INVALID_CHARACTER_ERR: DOM Exception 5

@colinmacc
Copy link
Author

DOM attribute names can not have a $ in them, that is true. DOM attribute values, of course, can have $ in them.

Model component names, however, can have $ in them, and this is prevented by parseBindStr's match regexp where it should not be. It is perfectly valid to name a model component with a $, and there's no point AFAIK where that model component name maps to a DOM attribute name.

So the regexp used to determine which elements of the Model can be inserted into DOM elements should be as indicated, to permit the full range of javascript identifiers as names of Model components.

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

No branches or pull requests

2 participants