From 5978ebe594585ea6ebff22d0e34f3b2ada70f898 Mon Sep 17 00:00:00 2001 From: Markus Winter Date: Thu, 6 Jun 2024 14:20:38 +0200 Subject: [PATCH] [JENKINS-73243] quote replacement string in symbol tooltips (#9347) --- .../main/java/org/jenkins/ui/symbol/Symbol.java | 7 ++++--- .../jenkins/ui/symbol/SymbolJenkinsTest.java | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/jenkins/ui/symbol/Symbol.java b/core/src/main/java/org/jenkins/ui/symbol/Symbol.java index 9a07556d7c71..52c7faee0249 100644 --- a/core/src/main/java/org/jenkins/ui/symbol/Symbol.java +++ b/core/src/main/java/org/jenkins/ui/symbol/Symbol.java @@ -14,6 +14,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Level; import java.util.logging.Logger; +import java.util.regex.Matcher; import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -72,13 +73,13 @@ public static String get(@NonNull SymbolRequest request) { .computeIfAbsent(identifier, key -> new ConcurrentHashMap<>()) .computeIfAbsent(name, key -> loadSymbol(identifier, key)); if ((tooltip != null && !tooltip.isBlank()) && (htmlTooltip == null || htmlTooltip.isBlank())) { - symbol = symbol.replaceAll("