Skip to content

#1621 fix: correct escaping of backslashes in URL wrapping #1622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: update URL snapshot and test case for escaping backslashes (#1621)
  • Loading branch information
ruchira-net committed Dec 2, 2024
commit 28ca565fdc8680f706bf9fcd1ee1f3fff3407d7f
2 changes: 1 addition & 1 deletion test/runtime/__snapshots__/getUrl.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ exports[`escape should escape url 42`] = `""image other.png#hash""`;

exports[`escape should escape url 43`] = `""image other.png#hash""`;

exports[`escape should escape url 44`] = `"http://url/path\\/"`;
exports[`escape should escape url 44`] = `"https://www.example.com?path=path\\to\\resource"`;
4 changes: 3 additions & 1 deletion test/runtime/getUrl.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ describe("escape", () => {
{ hash: "#hash", needQuotes: true },
),
).toMatchSnapshot();
expect(getUrl("http://url/path\\/")).toMatchSnapshot();
expect(
getUrl("https://www.example.com?path=path\\to\\resource"),
).toMatchSnapshot();
});
});