From e112b278469c1104eef3059f188ee3bd433582c8 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 17 Oct 2026 12:53:14 -1000 Subject: Encode repository urls and the feed branch Links built from the repository url, among them the description link on the index and the Atom and refs links, wrote it as configured, so a name holding a space, '#' or '?' broke them. The feed link in the page head did the same with the branch, which turned a '+' into a space. --- tests/t0303-robustness.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/t0303-robustness.sh') diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 888ca7f..2e0e849 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -639,6 +639,12 @@ test_expect_success 'the about redirect keeps the query string' ' grep "^Status: 200" tmp ' +test_expect_success 'the about redirect encodes the repository url once' ' + cgit_url "foo%2Bbar/about/" >tmp && + grep "^Status: 302" tmp && + grep "^Location: /foo%2Bbar/$" tmp +' + # The about page shows the readme alone and its links lead into the tree, # so a path below it names nothing, the site about page included. test_expect_success 'a path below the about page answers 404' ' -- cgit