Commit c47b1e6e6c
Unsigned
Layout: unified · split
HutchTests/ReadmeViewTests.swift +4 −1
| @@ -179,8 +179,11 @@ struct MarkdownRenderingTests { | |||
| 179 | func markdownImageQueryStringPreservesAmpersands() { | 179 | func markdownImageQueryStringPreservesAmpersands() { |
| 180 | let html = processInline("") | 180 | let html = processInline("") |
| 181 | 181 | ||
| 182 | // `&` is the correct encoding for `&` in an attribute value, so the | ||
| 183 | // failure mode to guard against is double-escaping, which would make the | ||
| 184 | // browser request a literal "&" in the query string. | ||
| 182 | #expect(html.contains("metric=security_rating")) | 185 | #expect(html.contains("metric=security_rating")) |
| 183 | #expect(!html.contains("amp;metric")) | 186 | #expect(!html.contains("&")) |
| 184 | #expect(html.contains("<img")) | 187 | #expect(html.contains("<img")) |
| 185 | } | 188 | } |
| 186 | 189 | ||