function(text, doubleQuote) {
    if (!doubleQuote) {
      // single quote fix
      return text.replace(/\\['\\]/g, function(seq) {
        return specialChar[seq];
      });
    }
    return text.replace(/\\[rntvef"'\\$]/g, function(seq) {
      return specialChar[seq];
    });
  }
function(text, doubleQuote) {
    if (!doubleQuote) {
      
      return text.replace(/\\['\\]/g, function(seq) {
        return specialChar[seq];
      });
    }
    return text.replace(/\\[rntvef"'\\$]/g, function(seq) {
      return specialChar[seq];
    });
  }
function ( text , doubleQuote ) { if ( ! doubleQuote ) { // single quote fix return text . replace ( / \\['\\] / g , function ( seq ) { return specialChar [ seq ] ; } ) ; } return text . replace ( / \\[rntvef"'\\$] / g , function ( seq ) { return specialChar [ seq ] ; } ) ; }
Unescape special chars
Unescape special chars