fix: HtmlUtils 特殊字符改用 Unicode 转义避免编译错误

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
王鹏
2026-04-10 19:30:19 +08:00
parent eb6339c9a7
commit b169a6662c

View File

@@ -33,13 +33,13 @@ public class HtmlUtils {
text = text.replaceAll("&quot;", "\"");
text = text.replaceAll("&apos;", "'");
text = text.replaceAll("&#39;", "'");
text = text.replaceAll("&mdash;", "");
text = text.replaceAll("&ndash;", "");
text = text.replaceAll("&hellip;", "");
text = text.replaceAll("&ldquo;", """);
text = text.replaceAll("&rdquo;", """);
text = text.replaceAll("&lsquo;", "'");
text = text.replaceAll("&rsquo;", "'");
text = text.replaceAll("&mdash;", "\u2014");
text = text.replaceAll("&ndash;", "\u2013");
text = text.replaceAll("&hellip;", "\u2026");
text = text.replaceAll("&ldquo;", "\u201C");
text = text.replaceAll("&rdquo;", "\u201D");
text = text.replaceAll("&lsquo;", "\u2018");
text = text.replaceAll("&rsquo;", "\u2019");
text = text.replaceAll("\\r\\n", "\n");
text = text.replaceAll("\\r", "\n");
text = text.replaceAll("\\n\\n+", "\n\n");