String.prototype.replace() is dumb

You have to make sure to pass the global flag, otherwise it only
replaces the first occurrence. Dumb.