Class Html

java.lang.Object
io.jstach.jstachio.escapers.Html

@JStacheContentType(mediaType="text/html") public final class Html extends Object
Provides a mustache spec based HTML escaper which is the default in normal mustache.

The escaper simply escapes:

  • '"'
  • '>'
  • '<'
  • '&'
N.B. Unlike many XML escapers this escaper does not differentiate attribute and element content. If that is needed a custom lambda could be used to preserve the whitespace in attributes.
Author:
Victor Nazarov, agentgt
  • Method Details

    • provider

      public static Escaper provider()
      Provides the escaper.
      Returns:
      HTML escaper.