code: public static String escapeString(String in, Map<String, String> headers) {
      return escapeString(in, headers, false, 0, 0);
    }
docs: Replace all substrings of form %{tagname} with get(tagname).toString() and
  all shorthand substrings of form %x with a special value.
  
  Any unrecognized / not found tags will be replaced with the empty string.
  
  TODO(henry): we may want to consider taking this out of Event and into a
  more general class when we get more use cases for this pattern.