Possible Javascript "replace" function bug in Google Chrome -


open chrome browser, try this:

'x </script>'.replace(/x/,'\'$\'')  ---> "' </script> </script>" 

and one:

'x'.replace(/x/,'$$') --> "$" 

in ie, correct.

did wrong?

thanks nicholas's answer. function can used replacement parameter avoid issue.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -