HTTP character encoding issue
Checklist
This bug template is meant to provide bug issues for code existing in the aurweb repository. This bug template is not meant to handle bugs with user-uploaded packages.
To work out a bug you have found in a user-uploaded package, contact the package's maintainer first. If you receive no response, file the relevant package request against it so TUs can deal with cleanup.
-
I confirm that this is an issue with aurweb's code and not a user-uploaded package. -
I have described the bug in complete detail in the Description section. -
I have specified steps in the Reproduction section.
Description
When a plus "+" character is included in the AUR package name, the HTTP url:s seems to encode the "+"-sign instead of "%2b". If a user/visitor to AUR package i.e. https://aur.archlinux.org/packages/wg++ try to click and check custom files (shell scripts etc), in this case the Source file "wgpp.sh" https://aur.archlinux.org/cgit/aur.git/tree/wgpp.sh?h=wg++ receives the error text "Invalid branch: wg". It is possible to view the custom Source files by going to "Package Actions" > "View Changes" > "tree" and then click on "wgpp.sh" which has the url link https://aur.archlinux.org/cgit/aur.git/tree/wgpp.sh?h=wg%2b%2b
Reproduction
Find an AUR package that contains plus "+" character in i.e. "name++.git". In this case my own package "wg++". https://aur.archlinux.org/packages/wg++
Go to "Sources" and click on link to "wgpp.sh" file. https://aur.archlinux.org/cgit/aur.git/tree/wgpp.sh?h=wg++
Error text produced will be "Invalid branch: wg" under tree path: root/wgpp.sh