docs: public String spanWrap(@Nullable Dir dir, String str, boolean isHtml) {
      BidiWrappingText wrappingText = spanWrappingText(dir, str, isHtml);
      if (!isHtml) {
        str = HtmlEscapers.htmlEscaper().escape(str);
      }
      return wrappingText.beforeText() + str + wrappingText.afterText();
    }