Fix PlaceholderServiceImpl#updateContent not quoting replacement

This commit is contained in:
Vankka 2023-06-25 21:14:13 +03:00
parent 7aa6191a27
commit ea404ec7ab
No known key found for this signature in database
GPG Key ID: 6E50CB7A29B96AD0

View File

@ -217,7 +217,7 @@ public class PlaceholderServiceImpl implements PlaceholderService {
Pattern.LITERAL Pattern.LITERAL
) )
.matcher(input) .matcher(input)
.replaceFirst(output instanceof String ? (String) output : output.toString()); .replaceFirst(Matcher.quoteReplacement(output.toString()));
} }
private Object getResultRepresentation(List<PlaceholderLookupResult> results, String placeholder, Matcher matcher) { private Object getResultRepresentation(List<PlaceholderLookupResult> results, String placeholder, Matcher matcher) {