code: public static String escapeAppName(String s) {
          s = cleanWS(s);
          s = replaceAll(s, BackSlashPtn, EscBackSlash);
          s = replaceAll(s, ForwardSlashPtn, EscForwardSlash);
          return s;
      }
docs: Escape application name before using to form user agent string.
  <p>
  Clean up white space and then escape back slash and forward slash
  characters.
  
  @param s
  
  @return The escaped app name.