Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 2026 19:33:54 +0000
From:      Wolfram Schneider <wosch@FreeBSD.org>
To:        doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org
Subject:   git: 5d176928a7 - main - ports.cgi: fix packages links for categories that contain a dash
Message-ID:  <69cc21a2.2186c.2d22472d@gitrepo.freebsd.org>

index | next in thread | raw e-mail

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' ) {


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69cc21a2.2186c.2d22472d>