diff options
Diffstat (limited to 'HutchTests/ReadmeViewTests.swift')
| -rw-r--r-- | HutchTests/ReadmeViewTests.swift | 5 |
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("") + // `&` 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("&amp;")) #expect(html.contains("<img")) } |
