tonsky / tongue

Do-it-yourself i18n library for Clojure/Script
Eclipse Public License 1.0
307 stars 19 forks source link

Regexp escape strings that are used as replacements #7

Closed cjohansen closed 7 years ago

cjohansen commented 7 years ago

The current version of Tongue throws an exception if string arguments to translations contain certain characters that have special meaning in regular expressions. For instance, any text containing an amount in dollars will be interpreted as a back reference, and in most cases will throw. See the provided test (which throws under 0.2.0, and works as expected in this PR).

tonsky commented 7 years ago

Fixed in 0.2.2. Thanks!