git: b48dfa77ed - main - ports.cgi: handle HTML in description

Wolfram Schneider <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by wosch:

URL: https://cgit.FreeBSD.org/doc/commit/?id=b48dfa77ed062a65adbdf60536444c3cd9581f02

commit b48dfa77ed062a65adbdf60536444c3cd9581f02
Author:     Wolfram Schneider <[email protected]>
AuthorDate: 2026-02-02 12:26:42 +0000
Commit:     Wolfram Schneider <[email protected]>
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;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.