docs: Optional<MsgEscapingStrategy> getMsgEscapingStrategy(SoyNode node) {
      switch (state) {
        case HTML_PCDATA:
          // In normal HTML PCDATA context, it makes sense to escape all of the print nodes, but not
          // escape the entire message.  This allows Soy to support putting anchors and other small
          // bits of HTML in messages.
          return Optional.of(new MsgEscapingStrategy(this, ImmutableList.of()));
  
        case CSS_DQ_STRING:
        case CSS_SQ_STRING:
        case JS_DQ_STRING:
        case JS_SQ_STRING:
        case TEXT:
        case URI:
          if (state == HtmlContext.URI && uriPart != UriPart.QUERY) {
            // NOTE: Only support the query portion of URIs.
            return Optional.absent();
          }
          // In other contexts like JS and CSS strings, it makes sense to treat the message's
          // placeholders as plain text, but escape the entire result of message evaluation.
          return Optional.of(
              new MsgEscapingStrategy(
                  new Context(HtmlContext.TEXT), getEscapingModes(node, ImmutableList.of())));
  
        case HTML_RCDATA:
        case HTML_NORMAL_ATTR_VALUE:
        case HTML_COMMENT:
          // The weirdest case is HTML attributes. Ideally, we'd like to treat these as a text string
          // and escape when done.  However, many messages have HTML entities such as &raquo; in them.
          // A good way around this is to escape the print nodes in the message, but normalize
          // (escape except for ampersands) the final message.
          // Also, content inside <title>, <textarea>, and HTML comments have a similar requirement,
          // where any entities in the messages are probably intended to be preserved.
          return Optional.of(
              new MsgEscapingStrategy(this, ImmutableList.of(EscapingMode.NORMALIZE_HTML)));
  
        default:
          // Other contexts, primarily source code contexts, don't have a meaningful way to support
          // natural language text.
          return Optional.absent();
      }
    }