diff --git a/core/src/main/java/org/springframework/security/util/TextUtils.java b/core/src/main/java/org/springframework/security/util/TextUtils.java index f24c635195..cd6e36d7e1 100644 --- a/core/src/main/java/org/springframework/security/util/TextUtils.java +++ b/core/src/main/java/org/springframework/security/util/TextUtils.java @@ -26,6 +26,8 @@ public abstract class TextUtils { sb.append("""); } else if (c == '\'') { sb.append("'"); + } else if (c == '&') { + sb.append("&"); } else { sb.append(c); }