Class HtmlUtils


  • public class HtmlUtils
    extends java.lang.Object
    Utility class for HTML related functions.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static @NotNull java.lang.String encode​(@NotNull java.lang.String str)
      Encodes a string so that the result can be embedded into HTML.
      static @Nullable java.lang.String encodeOptional​(@Nullable java.lang.String str)
      Encodes an optional string so that the result can be embedded into HTML.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • encodeOptional

        @Nullable
        public static @Nullable java.lang.String encodeOptional​(@Nullable
                                                                @Nullable java.lang.String str)
        Encodes an optional string so that the result can be embedded into HTML.
        Parameters:
        str - the optional string to encode
        Returns:
        the optional encoded string; returns null if the input parameter is null
      • encode

        @NotNull
        public static @NotNull java.lang.String encode​(@NotNull
                                                       @NotNull java.lang.String str)
        Encodes a string so that the result can be embedded into HTML.
        Parameters:
        str - the string to encode
        Returns:
        the encoded string