Open colinmacc opened 12 years ago
I took a look at this. Attempting to put $
into attributes results in: INVALID_CHARACTER_ERR: DOM Exception 5
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.
And therefore parseBindStr's match regexp must be regex = /([a-zA-Z0-9$-]+)(?:[\s=]+([a-zA-Z0-9$_-]+))?/,