Skip to content

Commit 084b2f8

Browse files
evilebottnawimichael-ciniawsky
authored andcommitted
test: inline SVG with comment (#217)
1 parent e86d757 commit 084b2f8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/fixUrlsTest.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,13 @@ describe("fix urls tests", function() {
191191
it("Doesn't break inline SVG", function() {
192192
const svg = "url('data:image/svg+xml;charset=utf-8,<svg><feFlood flood-color=\"rgba(0,0,0,0.5)\" /></svg>')";
193193

194+
assertUrl(
195+
"body: { background: " + svg + " }"
196+
);
197+
});
198+
it("Doesn't break inline SVG with HTML comment", function() {
199+
const svg = "url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3C!--%20Comment%20--%3E%0A%3Csvg%3E%3C%2Fsvg%3E%0A')";
200+
194201
assertUrl(
195202
"body: { background: " + svg + " }"
196203
);

0 commit comments

Comments
 (0)