airbnb / polyglot.js

Give your JavaScript the ability to speak many languages.
http://airbnb.github.io/polyglot.js
BSD 2-Clause "Simplified" License
3.71k stars 208 forks source link

$ in replacement strings gets interpreted as a part of the regex replacement #36

Closed ghost closed 8 years ago

ghost commented 9 years ago

$ should be escaped to prevent unintended sequences like $1 or $& getting substituted from parts of the template.