git: b48dfa77ed - main - ports.cgi: handle HTML in description
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 02 Feb 2026 12:27:16 UTC
The branch main has been updated by wosch:
URL: https://cgit.FreeBSD.org/doc/commit/?id=b48dfa77ed062a65adbdf60536444c3cd9581f02
commit b48dfa77ed062a65adbdf60536444c3cd9581f02
Author: Wolfram Schneider <wosch@FreeBSD.org>
AuthorDate: 2026-02-02 12:26:42 +0000
Commit: Wolfram Schneider <wosch@FreeBSD.org>
CommitDate: 2026-02-02 12:26:42 +0000
ports.cgi: handle HTML in description
---
website/content/en/cgi/ports.cgi | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/website/content/en/cgi/ports.cgi b/website/content/en/cgi/ports.cgi
index cc51cf2281..c379fa2be3 100755
--- a/website/content/en/cgi/ports.cgi
+++ b/website/content/en/cgi/ports.cgi
@@ -428,7 +428,8 @@ sub package_links {
}
if ( $. == 1 ) {
- print qq[<h2>$perl->{"name"}: $perl->{"comment"}</h2>\n];
+ print qq[<h2>$perl->{"name"}: ], escapeHTML( $perl->{"comment"} ),
+ qq[</h2>\n];
print qq[homepage: <a href="], $perl->{"www"},
qq[">] . $perl->{"www"} . "</a><br/>\n";
@@ -439,7 +440,7 @@ sub package_links {
print qq[maintainer: ], $perl->{"maintainer"}, "<br/>\n";
print qq[<h3>Description</h3>\n];
- print "<pre>", $perl->{"desc"}, "</pre>\n";
+ print "<pre>", escapeHTML( $perl->{"desc"} ), "</pre>\n";
print qq[<h3>Download packages in *.pkg format</h3>\n];
print $no_javascript_warning, $pkg_javascript;