Replace with regex, global switch is non-standard
Merge pull request #32 from vikingco/fix/javascript-regex

Javascript replace global switch doesn't work in Chrome