I have the following regular expression
/\<oauth_token\>([^\<]*)\<\/oauth_token\>/
I see jslint violations for unescaped <characters, but can't figure out why. Can someone enlighten me please?
This regular expression is assigned to a variable and is used throughout the file. It is located in the nodejs module.
This is a hack to get around the non-standard OAUth answer, which will be fixed at some point in the future. I do not want to cite the XML parser as an additional dependency to solve the problem.
I see this violation with both JSHint and node-jslint.
You can see the full source code for the github file. The exact JSHint output looks like this: as follows:
lib/oauth-helper.js: line 5, col 21, Unexpected escaped character '<' in regular expression. lib/oauth-helper.js: line 5, col 39, Unexpected escaped character '<' in regular expression. lib/oauth-helper.js: line 5, col 44, Unexpected escaped character '<' in regular expression. lib/oauth-helper.js: line 6, col 22, Unexpected escaped character '<' in regular expression. lib/oauth-helper.js: line 6, col 47, Unexpected escaped character '<' in regular expression. lib/oauth-helper.js: line 6, col 52, Unexpected escaped character '<' in regular expression.
Raoul
source share