001package io.jstach.jstachio.escapers;
002
003import io.jstach.jstache.JStacheContentType;
004import io.jstach.jstachio.Escaper;
005
006/**
007 * Provides a mustache spec based HTML escaper which is the default in normal mustache.
008 * <p>
009 * The escaper simply escapes:
010 * <ul>
011 * <li>'&quot;'
012 * <li>'&gt;'
013 * <li>'&lt;'
014 * <li>'&amp;'
015 * </ul>
016 *
017 * <em>N.B. Unlike many XML escapers this escaper does not differentiate attribute and
018 * element content. If that is needed a custom lambda could be used to preserve the
019 * whitespace in attributes. </em>
020 *
021 * @author Victor Nazarov
022 * @author agentgt
023 */
024@JStacheContentType(mediaType = "text/html")
025public final class Html {
026
027        private Html() {
028        }
029
030        /**
031         * Provides the escaper.
032         * @return HTML escaper.
033         */
034        public static Escaper provider() {
035                return HtmlEscaper.Html;
036        }
037
038}