All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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("\"", """);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy