Class HTML4Encoder

All Implemented Interfaces:
CodecIdentifierProvider, Encoder, EncodesToWriter, StreamingEncoder

public class HTML4Encoder extends AbstractCharReplacementEncoder
This encoder is for HTML4 documents. It uses escaping information from Spring's HtmlUtils so that this is compatible with the previous "encodeAsHTML" in older Grails versions.
Since:
2.3
  • Constructor Details

    • HTML4Encoder

      public HTML4Encoder()
  • Method Details

    • escapeCharacter

      protected String escapeCharacter(char ch, char previousChar)
      Description copied from class: AbstractCharReplacementEncoder
      Escape the character, return null if no replacement has to be made
      Specified by:
      escapeCharacter in class AbstractCharReplacementEncoder
      Parameters:
      ch - the character to escape
      previousChar - the previous char
      Returns:
      the replacement string, null if no replacement has to be made