From 5b718bdb4505b72bfd57895cb079b4a5a7ec9235 Mon Sep 17 00:00:00 2001 From: e551763 Date: Tue, 2 Jul 2024 15:54:14 +0200 Subject: [PATCH] chore: polynomial regular expression fix attempt #2 --- .../sbb/polarion/extension/pdf/exporter/util/HtmlProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ch/sbb/polarion/extension/pdf/exporter/util/HtmlProcessor.java b/src/main/java/ch/sbb/polarion/extension/pdf/exporter/util/HtmlProcessor.java index 794f580..6ee9f5e 100644 --- a/src/main/java/ch/sbb/polarion/extension/pdf/exporter/util/HtmlProcessor.java +++ b/src/main/java/ch/sbb/polarion/extension/pdf/exporter/util/HtmlProcessor.java @@ -1107,7 +1107,7 @@ private int findTableEnd(String html, int tableStart) { @SuppressWarnings({"java:S5852", "java:S5857"}) //need by design public String replaceImagesAsBase64Encoded(String html) { // Replace encoded underscore symbol in 'src' attribute of images - Matcher encodedUnderscoreMatcher = Pattern.compile("src=\"[^\"]*?%5F[^\"]*?\"").matcher(html); + Matcher encodedUnderscoreMatcher = Pattern.compile("src=\"[^\"]*%5F[^\"]*\"").matcher(html); StringBuilder buf = new StringBuilder(); while (encodedUnderscoreMatcher.find()) { String group = encodedUnderscoreMatcher.group();