summaryrefslogtreecommitdiff
path: root/HutchTests/ReadmeViewTests.swift
diff options
context:
space:
mode:
Diffstat (limited to 'HutchTests/ReadmeViewTests.swift')
-rw-r--r--HutchTests/ReadmeViewTests.swift5
1 files changed, 4 insertions, 1 deletions
diff --git a/HutchTests/ReadmeViewTests.swift b/HutchTests/ReadmeViewTests.swift
index 3b9d80b..08e602d 100644
--- a/HutchTests/ReadmeViewTests.swift
+++ b/HutchTests/ReadmeViewTests.swift
@@ -179,8 +179,11 @@ struct MarkdownRenderingTests {
func markdownImageQueryStringPreservesAmpersands() {
let html = processInline("![badge](https://sonarcloud.io/api/project_badges/measure?project=ccleberg_Hutch&metric=security_rating)")
+ // `&` is the correct encoding for `&` in an attribute value, so the
+ // failure mode to guard against is double-escaping, which would make the
+ // browser request a literal "&" in the query string.
#expect(html.contains("metric=security_rating"))
- #expect(!html.contains("amp;metric"))
+ #expect(!html.contains("&"))
#expect(html.contains("<img"))
}