From 97d026e3d634545bcd96eff7eeab0f6a9904d7c0 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Tue, 22 Oct 2024 11:39:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=87=BA=E6=B2=A1=E6=9C=89=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E6=A0=BC=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1047747 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001047747 --- .../service/FunctionalCaseFileService.java | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseFileService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseFileService.java index ecb13d0635..8659892cab 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseFileService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseFileService.java @@ -77,9 +77,6 @@ import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.concurrent.atomic.AtomicInteger; -import java.util.regex.MatchResult; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import java.util.stream.Collectors; /** @@ -861,22 +858,9 @@ public class FunctionalCaseFileService { } public String parseHtml(String html) { - Pattern pattern = Pattern.compile("]*>(.*?)

"); - Matcher matcher = pattern.matcher(html); - StringBuilder result = new StringBuilder(); - List list = matcher.results().toList(); - if (CollectionUtils.isNotEmpty(list)) { - for (MatchResult matchResult : list) { - result.append(matchResult.group(1)); - } - } else { - result.append(html); - } - - return result.toString(); + return html.replaceAll("]*>", ""); } - /** * 获取模块map *