Skip to content

Commit c1df9a9

Browse files
authored
Ensure & is escaped in XML output. (#555)
Ensure `&` is escaped in XML output as `&`. Thanks for the reminder, @jakepetroules. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
1 parent b19c9af commit c1df9a9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/Testing/Events/Recorder/Event.JUnitXMLRecorder.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ extension Event.JUnitXMLRecorder {
216216
"<"
217217
case ">":
218218
">"
219+
case "&":
220+
"&"
219221
case _ where !character.isASCII:
220222
character.unicodeScalars.lazy
221223
.map(\.value)

0 commit comments

Comments
 (0)