helper: str replace function should replace all instances of placeholder

This commit is contained in:
eberhab 2016-04-20 14:04:46 +02:00 committed by PetaByteBoy // Milan Pässler
parent 31545c758d
commit bc7e7888a5

View file

@ -75,7 +75,8 @@ function localStorageTest() {
function listReplace(s, subst) {
for (key in subst) {
s = s.replace(key, subst[key])
var re = new RegExp(key, 'g');
s = s.replace(re, subst[key])
}
return s
}