Skip to content

Commit

Permalink
chore: polynomial regular expression fix attempt #3
Browse files Browse the repository at this point in the history
  • Loading branch information
Jumas committed Jul 2, 2024
1 parent 5b718bd commit c86e763
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c86e763

Please sign in to comment.