jnns/jquery-tokeninput — comment on commit 16c59980340aeeeaad8e82e5f939c937b5f9e2c8
File:  line 0
By ryguasu:

It looks like this is the best fix for #65 on github (compare https://github.com/loopj/jquery-tokeninput/pull/177), but it doesn't look like there was ever a pull request initiated to get this into the main repo. Is that something under consideration? It'd be nice if a fix for this were in the official repo.

I looked at the list of special chars in this commit, and it looks good. A few comments, though it's mostly nit-picking:

It seems like regexp escaping should be build into javascript. But it's not, as far as I know.

Comparing to http://stackoverflow.com/questions/2593637/how-to-escape-regular-expression-in-javascript, I wonder if it's necessary to escape "#" and "\s" actually need to be escaped. But it seems just as likely that the regexp given there is incorrect.

Looking at the ECMAScript spec (http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262%20edition%205.1,%20June%202011.pdf, section 5.10) makes me wonder if "!" and "=" also should be escaped,to deal with certain edge cases. I haven't dug into this, though.