code: function escapeCharacters(text, charsToEscape, afterBackslash) {
  
          var regexString = "([" + charsToEscape.replace(/([\[\]\\])/g,"\\$1") + "])";
  
          if(afterBackslash) {
              regexString = "\\\\" + regexString;
          }
  
          var regex = new RegExp(regexString,"g");
  
          text = text.replace(regex,escapeCharacters_callback);
  
          return text;
      }
docs: }}} {{{ escapeCharacters