Javascript String replaceAll(toReplace, replacement)
String.prototype.replaceAll = function (toReplace, replacement) { var result = this.split(toReplace).join(replacement); return result; };