summaryrefslogtreecommitdiff
path: root/build-aux/pmccabe2html
diff options
context:
space:
mode:
authorMats Erik Andersson <gnu@gisladisker.se>2013-09-25 22:27:03 +0200
committerPádraig Brady <P@draigBrady.com>2013-09-26 00:44:17 +0100
commit883e87df0a2236794c97afdd985c3706074d3195 (patch)
tree06e2707cfe4d4017cc9104d2631034214c1a1628 /build-aux/pmccabe2html
parent4a5ee89c8a8be7350a8fd8ca1bacb196a190e492 (diff)
downloadgnulib-883e87df0a2236794c97afdd985c3706074d3195.tar.gz
pmccabe2html: escaping of special characters
The C code characters '<', '>', and '&' were improperly escaped in HTML output, and their multiplicity was ignored.
Diffstat (limited to 'build-aux/pmccabe2html')
-rw-r--r--build-aux/pmccabe2html6
1 files changed, 3 insertions, 3 deletions
diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html
index 094c3e9f88..ffd07881b3 100644
--- a/build-aux/pmccabe2html
+++ b/build-aux/pmccabe2html
@@ -422,9 +422,9 @@ function html_fnc (nfun,
while ((getline codeline < (fname nfun "_fn.txt")) > 0)
{
- sub(/\\</, "&lt;", codeline)
- sub(/\\>/, "&gt;", codeline)
- sub(/&/, "&amp;", codeline)
+ gsub(/&/, "\&amp;", codeline) # Must come first.
+ gsub(/</, "\&lt;", codeline)
+ gsub(/>/, "\&gt;", codeline)
print codeline
}