| Newsgroups |
gmane.comp.web.curl.www.cvs |
| Message-ID |
<[email protected]> |
Update of /cvsroot/curl/curl-www
In directory labb:/tmp/cvs-serv26152
Modified Files:
curl.pm
Log Message:
more HTML encoding
Index: curl.pm
===================================================================
RCS file: /cvsroot/curl/curl-www/curl.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- curl.pm 12 May 2005 12:59:06 -0000 1.10
+++ curl.pm 12 May 2005 13:04:51 -0000 1.11
@@ -5,7 +5,7 @@
sub stitle {
my ($title)=@_;
- return "<h1 class=\"pagetitle\">$title</h1>";
+ return "<h1 class=\"pagetitle\">".CGI::escapeHTML($title)."</h1>";
}
sub title {
@@ -15,7 +15,7 @@
sub subtitle {
my $title=$_[0];
- print "<h2>$title</h2>";
+ print "<h2>".CGI::escapeHTML($title)."</h2>";
}
# WHERE2(Feedback, "/feedback/", Bug Report)
@@ -32,10 +32,10 @@
if($name) {
# things look ok
if($link) {
- print " <a href=\"$link\">$name</a> $pic";
+ print " <a href=\"$link\">".CGI::escapeHTML($name)."</a> $pic";
}
else {
- print " <b>$name</b>";
+ print " <b>".CGI::escapeHTML($name)."</b>";
}
}
else {
@@ -44,6 +44,7 @@
}
}
+# catfile assumes a HTML-encoded file!
sub catfile {
open (CAT, $_[0]);
while(<CAT>) {
@@ -52,7 +53,7 @@
close(CAT);
}
-# <pre>-print a file, convert <> to HTML
+# <pre>-print a file, convert to HTML encoding
sub precatfile {
open (CAT, $_[0]);
print "<pre>\n";
@@ -64,7 +65,8 @@
}
sub header {
- my ($head)=@_;
+ my ($ihead)=@_;
+ my $head = CGI::escapeHTML($ihead);
open(HEAD, "<$root/head.html");
while(<HEAD>) {
_______________________________________________
http://cool.haxx.se/mailman/listinfo/curl-www-commits