配置关键字转译之前去掉首尾空格

Signed-off-by: zhangwei <zhangwei@intranet.com>
This commit is contained in:
zhangwei
2018-06-30 12:43:22 +08:00
parent d0e2b409e5
commit d9d968dcaa
2 changed files with 2 additions and 1 deletions

View File

@@ -580,6 +580,7 @@ public abstract class BaseService {
public static String keywordsEscape(String cfgKeywords){
if(StringUtils.isNotEmpty(cfgKeywords)){
//不转译特殊字符
cfgKeywords = cfgKeywords.trim();//首先去掉首尾空格
cfgKeywords = StringEscapeUtils.unescapeHtml4(cfgKeywords);
cfgKeywords=cfgKeywords.replace("\\", "\\\\");
cfgKeywords=cfgKeywords.replace("&", "\\&");