作者 RuoYi

HTML过滤器不替换双引号为",防止json格式无效

@@ -522,7 +522,8 @@ public final class HTMLFilter @@ -522,7 +522,8 @@ public final class HTMLFilter
522 final String one = m.group(1); // (>|^) 522 final String one = m.group(1); // (>|^)
523 final String two = m.group(2); // ([^<]+?) 523 final String two = m.group(2); // ([^<]+?)
524 final String three = m.group(3); // (<|$) 524 final String three = m.group(3); // (<|$)
525 - m.appendReplacement(buf, Matcher.quoteReplacement(one + regexReplace(P_QUOTE, "&quot;", two) + three)); 525 + // 不替换双引号为&quot;,防止json格式无效 regexReplace(P_QUOTE, "&quot;", two)
  526 + m.appendReplacement(buf, Matcher.quoteReplacement(one + two + three));
526 } 527 }
527 m.appendTail(buf); 528 m.appendTail(buf);
528 return buf.toString(); 529 return buf.toString();