Commit 71c31dfd authored by RuoYi's avatar RuoYi

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

parent 8bc7296f
...@@ -522,7 +522,8 @@ public final class HTMLFilter ...@@ -522,7 +522,8 @@ public final class HTMLFilter
final String one = m.group(1); // (>|^) final String one = m.group(1); // (>|^)
final String two = m.group(2); // ([^<]+?) final String two = m.group(2); // ([^<]+?)
final String three = m.group(3); // (<|$) final String three = m.group(3); // (<|$)
m.appendReplacement(buf, Matcher.quoteReplacement(one + regexReplace(P_QUOTE, "&quot;", two) + three)); // 不替换双引号为&quot;,防止json格式无效 regexReplace(P_QUOTE, "&quot;", two)
m.appendReplacement(buf, Matcher.quoteReplacement(one + two + three));
} }
m.appendTail(buf); m.appendTail(buf);
return buf.toString(); return buf.toString();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment