Improve escaping performance

This commit is contained in:
Adam Gent
2023-12-19 12:57:38 -05:00
parent a4cd8010a7
commit 96aac1a41f
3 changed files with 125 additions and 1 deletions
@@ -433,6 +433,14 @@ public class Template {
throw new MustacheException(ioe);
}
}
protected static void escape (Appendable out, CharSequence data, Mustache.Escaper escape) {
try {
escape.escape(out, data);
} catch (IOException ioe) {
throw new MustacheException(ioe);
}
}
}
/** Used to cache variable fetchers for a given context class, name combination. */