git: 5d176928a7 - main - ports.cgi: fix packages links for categories that contain a dash
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 31 Mar 2026 19:33:54 UTC
The branch main has been updated by wosch:
URL: https://cgit.FreeBSD.org/doc/commit/?id=5d176928a765e58f3a2d7de605ebaaaaa751445f
commit 5d176928a765e58f3a2d7de605ebaaaaa751445f
Author: Wolfram Schneider <wosch@FreeBSD.org>
AuthorDate: 2026-03-31 19:32:49 +0000
Commit: Wolfram Schneider <wosch@FreeBSD.org>
CommitDate: 2026-03-31 19:32:49 +0000
ports.cgi: fix packages links for categories that contain a dash
PR: 293721
---
website/content/en/cgi/ports.cgi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/website/content/en/cgi/ports.cgi b/website/content/en/cgi/ports.cgi
index c036f4665a..d4f1c6bbc0 100755
--- a/website/content/en/cgi/ports.cgi
+++ b/website/content/en/cgi/ports.cgi
@@ -878,14 +878,14 @@ $counter = 0;
$query =~ s/^\^// if $stype eq 'requires';
# quote non characters
+my $query2 = $query;
$query =~ s/([^\w\^])/\\$1/g;
# search
if ($query) {
my $q = "";
- if ( $query =~ m,^([A-Za-z0-9\-]+)(\\/)([A-Za-z0-9\-_\+\.\\]+)$, ) {
- $q = "$1$2$3";
- $q =~ s,\\,,g;
+ if ( $query2 =~ m,^([A-Za-z0-9\-]+)/([A-Za-z0-9\-_\+\.\\]+)$, ) {
+ $q = "$1/$2";
}
if ( $q ne "" && $enable_packages_link && $stype eq 'pkg' ) {