code: public static String escapeEscapes(String value)
      {
          assert(value != null);
          InternalStringBuilder sb = new InternalStringBuilder(value.length());
          for (int i = 0; i < value.length(); i++) {
              char c = value.charAt(i);
              if (c == '"') {
                  sb.append("&quot;");
                  continue;
              }
              if (c == '\\') {
                  sb.append("\\\\");
                  continue;
              }
              sb.append(c);
          }
          return sb.toString();
      }
docs: Escape the escapes (") and (\\) with escapes.  These characters will be replaced with
  (&quot) and (\\\\) respectively.
  @param value the string to escape
  @return the escaped string