Skip to content

Commit

Permalink
Merge pull request #2260 from SanojPunchihewa/payload-fix
Browse files Browse the repository at this point in the history
Escape special characters when XML is considered literal
  • Loading branch information
SanojPunchihewa authored Dec 12, 2024
2 parents 4c5c6c3 + e3a4031 commit 875b8c7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private void replace(String format, StringBuffer result, String mediaType, Messa
} else if (JSON_TYPE.equals(mediaType)) {
if (isXML(replacementValue)) {
// consider the replacement value as a literal XML
replacementValue = Matcher.quoteReplacement(replacementValue);
replacementValue = escapeSpecialChars(Matcher.quoteReplacement(replacementValue));
} else {
replacementValue = escapeSpecialCharactersOfJson(replacementValue);
}
Expand Down

0 comments on commit 875b8c7

Please sign in to comment.