From b169a6662c03e080abaa6a8fa0be8c545f8dbcbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E9=B9=8F?= Date: Fri, 10 Apr 2026 19:30:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20HtmlUtils=20=E7=89=B9=E6=AE=8A=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E6=94=B9=E7=94=A8=20Unicode=20=E8=BD=AC=E4=B9=89?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- .../java/com/ruoyi/common/utils/HtmlUtils.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/HtmlUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/HtmlUtils.java index 88fc1bd..de34ed2 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/HtmlUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/HtmlUtils.java @@ -33,13 +33,13 @@ public class HtmlUtils { text = text.replaceAll(""", "\""); text = text.replaceAll("'", "'"); text = text.replaceAll("'", "'"); - text = text.replaceAll("—", "—"); - text = text.replaceAll("–", "–"); - text = text.replaceAll("…", "…"); - text = text.replaceAll("“", """); - text = text.replaceAll("”", """); - text = text.replaceAll("‘", "'"); - text = text.replaceAll("’", "'"); + text = text.replaceAll("—", "\u2014"); + text = text.replaceAll("–", "\u2013"); + text = text.replaceAll("…", "\u2026"); + text = text.replaceAll("“", "\u201C"); + text = text.replaceAll("”", "\u201D"); + text = text.replaceAll("‘", "\u2018"); + text = text.replaceAll("’", "\u2019"); text = text.replaceAll("\\r\\n", "\n"); text = text.replaceAll("\\r", "\n"); text = text.replaceAll("\\n\\n+", "\n\n");