code: public SanitizedContentKind getMostAppropriateContentKind() {
      SanitizedContentKind kind = STATE_TO_CONTENT_KIND.get(state);
      if (kind != null && isValidStartContextForContentKindLoose(kind)) {
        return kind;
      }
      return SanitizedContentKind.TEXT;
    }
docs: Returns the most sensible content kind for a context.
  
  <p>This is primarily for error messages, indicating to the user what content kind can be used
  to mostly null out the escaping. Returns TEXT if no useful match was detected.