summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradrianp <adrianp@pkgsrc.org>2007-08-06 19:28:17 +0000
committeradrianp <adrianp@pkgsrc.org>2007-08-06 19:28:17 +0000
commit462a5ff1d9f29d5d97ca97956334a05e40a6ce9d (patch)
treeef205682453ffe31344f77e75773a96ed924351d
parent44eab0f3ebc86eb10aec38f427cdc4edca18c5e5 (diff)
downloadpkgsrc-462a5ff1d9f29d5d97ca97956334a05e40a6ce9d.tar.gz
Encode the generated HTML properly, taken from genreadme.awk
-rw-r--r--mk/bsd.pkg.readme.mk10
1 files changed, 7 insertions, 3 deletions
diff --git a/mk/bsd.pkg.readme.mk b/mk/bsd.pkg.readme.mk
index 6d72be5cc4a..022776209a0 100644
--- a/mk/bsd.pkg.readme.mk
+++ b/mk/bsd.pkg.readme.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.readme.mk,v 1.10 2007/08/06 02:36:24 adrianp Exp $
+# $NetBSD: bsd.pkg.readme.mk,v 1.11 2007/08/06 19:28:17 adrianp Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and encapsulates the
# code to produce README.html files in each package directory.
@@ -253,9 +253,13 @@ show-vulnerabilities-html:
_PKGVULNDIR=`audit-packages ${AUDIT_PACKAGES_FLAGS} -Q PKGVULNDIR`; \
if [ -f $$_PKGVULNDIR/pkg-vulnerabilities ]; then \
audit-packages ${AUDIT_PACKAGES_FLAGS} -n ${PKGNAME} 2>&1| ${AWK} \
- '{ gsub("\<", "\\&lt;", $$2); \
+ '{ printurl = $$8; \
+ gsub("\<", "\\&lt;", $$2); \
gsub("\>", "\\&gt;", $$2); \
- printf("<LI><STRONG>%s has a %s exploit (see <a href=\"%s\">%s</a> for more details)</STRONG></LI>\n", $$2, $$5, $$8, $$8) }'; \
+ gsub("\<", "\\&lt;", printurl); \
+ gsub("\>", "\\&gt;", printurl); \
+ gsub("\&", "\\&amp;", printurl); \
+ printf("<LI><STRONG>%s has a %s exploit (see <a href=\"%s\">%s</a> for more details)</STRONG></LI>\n", $$2, $$5, $$8, printurl) }'; \
fi; \
fi