summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorville <ville@localhost>2005-01-09 14:29:34 +0000
committerville <ville@localhost>2005-01-09 14:29:34 +0000
commitb33a39c2d51d154e61787f22d83fc39900a17270 (patch)
tree4945763d475b684147756d98d96215ff8d946b13
parentf74951a5eae4e80dfd6fa649854444e7007efac4 (diff)
downloadmarkup-validator-b33a39c2d51d154e61787f22d83fc39900a17270.zip
markup-validator-b33a39c2d51d154e61787f22d83fc39900a17270.tar.gz
markup-validator-b33a39c2d51d154e61787f22d83fc39900a17270.tar.bz2
Escape "file URI" properly in CSS validator URI query string param.
Generally speaking, it would be better to do the escaping consistently in the templates wherever possible instead of in "check", no?
-rwxr-xr-xhttpd/cgi-bin/check7
-rw-r--r--share/templates/en_US/valid.tmpl2
2 files changed, 4 insertions, 5 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index 9c16fca..0ccd585 100755
--- a/httpd/cgi-bin/check
+++ b/httpd/cgi-bin/check
@@ -9,7 +9,7 @@
# This source code is available under the license at:
# http://www.w3.org/Consortium/Legal/copyright-software
#
-# $Id: check,v 1.367 2005-01-09 11:24:33 ville Exp $
+# $Id: check,v 1.368 2005-01-09 14:29:34 ville Exp $
#
# Disable buffering on STDOUT!
@@ -222,7 +222,7 @@ Directory not readable (permission denied): @_r
#
# Strings
- $VERSION = q$Revision: 1.367 $;
+ $VERSION = q$Revision: 1.368 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
#
@@ -936,6 +936,7 @@ sub prep_template ($$) {
#
# The URI...
$T->param(file_uri => &ent($File->{URI}));
+ $T->param(file_uri_param => uri_escape($File->{URI}));
#
# Metadata...
@@ -973,8 +974,6 @@ sub report_valid {
my $File = shift;
my $T = shift;
- $T->param(file_uri => &ent($File->{URI}));
-
my $gifborder = ' border="0"';
my $xhtmlendtag = '';
my($image_uri, $alttext, $gifhw);
diff --git a/share/templates/en_US/valid.tmpl b/share/templates/en_US/valid.tmpl
index 6966b42..24fe6c5 100644
--- a/share/templates/en_US/valid.tmpl
+++ b/share/templates/en_US/valid.tmpl
@@ -65,7 +65,7 @@
check it for validity
<TMPL_ELSE>
<a title="Validate CSS at the W3C CSS Validator"
- href="http://jigsaw.w3.org/css-validator/validator?uri=<TMPL_VAR NAME="file_uri">">check
+ href="http://jigsaw.w3.org/css-validator/validator?uri=<TMPL_VAR NAME="file_uri_param">">check
it for validity</a>
</TMPL_IF>
using the W3C