summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorjfieber <jfieber@FreeBSD.org>1997-01-17 21:44:45 +0000
committerjfieber <jfieber@FreeBSD.org>1997-01-17 21:44:45 +0000
commite81eaa9947c53e7f30f4f9b720f9eaab255fc045 (patch)
treee2a2776caaa6e56065e176a7a5b1bca3c94480fd /usr.bin
parent282d267078dfa945ba309039799189ce4b87d6f1 (diff)
downloadFreeBSD-src-e81eaa9947c53e7f30f4f9b720f9eaab255fc045.zip
FreeBSD-src-e81eaa9947c53e7f30f4f9b720f9eaab255fc045.tar.gz
Close PR #2453 (illegal tags in HTML <TITLE> element)
2.2 fodder
Diffstat (limited to 'usr.bin')
-rwxr-xr-xusr.bin/sgmlfmt/sgmlfmt.pl10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/sgmlfmt/sgmlfmt.pl b/usr.bin/sgmlfmt/sgmlfmt.pl
index 9eb347c..a38d118 100755
--- a/usr.bin/sgmlfmt/sgmlfmt.pl
+++ b/usr.bin/sgmlfmt/sgmlfmt.pl
@@ -356,11 +356,13 @@ sub html2html {
chop;
$st_header[0] = $_;
$st_parent[0] = -1;
- print tocfile "<HEAD>\n<TITLE>$st_header[0]</TITLE>\n</HEAD>\n";
+ $t = $st_header[0];
+ $t =~ s|<[a-zA-Z/][^>]*>||g;
+ print tocfile "<HEAD>\n<TITLE>$t</TITLE>\n</HEAD>\n";
print tocfile "<H1>$st_header[0]</H1>\n";
$header[$st_ol[$sc]] =
- "$doctype\n<HTML>\n<HEAD>\n<TITLE>$st_header[0]</TITLE>\n" .
+ "$doctype\n<HTML>\n<HEAD>\n<TITLE>$t</TITLE>\n" .
"</HEAD>\n$BODY\n";
$header[$st_ol[$sc]] .= $html_header;
if ($opt_ssi) { # Server Side Include hook
@@ -394,8 +396,10 @@ sub html2html {
# set up headers and footers
if ($st_sl[$sc] > 0 && $st_sl[$sc] <= $maxlevel) {
+ $t = $_;
+ $t =~ s|<[a-zA-Z/][^>]*>||g;
$header[$st_ol[$sc]] =
- "$doctype\n<HTML>\n<HEAD>\n<TITLE>$_</TITLE>\n</HEAD>\n$BODY\n";
+ "$doctype\n<HTML>\n<HEAD>\n<TITLE>$t</TITLE>\n</HEAD>\n$BODY\n";
$header[$st_ol[$sc]] .= $html_header;
if ($opt_ssi) { # Server Side Include hook
$header[$st_ol[$sc]] .=
OpenPOWER on IntegriCloud