liqp.filters.Escape Maven / Gradle / Ivy
package liqp.filters;
class Escape extends Filter {
/*
* escape(input)
*
* escape a string
*/
@Override
public Object apply(Object value, Object... params) {
String str = super.asString(value);
return str.replace("&", "&")
.replace("<", "<")
.replace(">", ">")
.replace("\"", """);
}
}