code: function replaceString(content, search, replace) {
          var index = 0;
  
          do {
            index = content.indexOf(search, index);
  
            if (index !== -1) {
              content = content.substring(0, index) + replace + content.substr(index + search.length);
              index += replace.length - search.length + 1;
            }
          } while (index !== -1);
  
          return content;
        }
docs: Replaces strings without regexps to avoid FF regexp to big issue