添加HTML代码反转义支持

This commit is contained in:
Lukin 2020-04-07 10:16:46 +08:00
parent 369ee82445
commit 8b9cec62bc

View File

@ -2,6 +2,7 @@ package org.spiderflow.core.executor.function.extension;
import com.alibaba.fastjson.JSON;
import org.apache.commons.lang3.math.NumberUtils;
import org.apache.commons.text.StringEscapeUtils;
import org.jsoup.nodes.Element;
import org.jsoup.parser.Parser;
import org.jsoup.select.Elements;
@ -133,4 +134,10 @@ public class StringFunctionExtension implements FunctionExtension{
public static Date toDate(String source,String pattern) throws ParseException{
return DateFunctionExecutor.parse(source, pattern);
}
@Comment("反转义字符串")
@Example("${strVar.unescape()}")
public static String unescape(String source){
return StringEscapeUtils.unescapeJava(source);
}
}