diff options
author | ot <ot@localhost> | 2007-03-15 06:30:15 +0000 |
---|---|---|
committer | ot <ot@localhost> | 2007-03-15 06:30:15 +0000 |
commit | bc1bc798dc193d1fcfa65a40be84b2d9f5f4cbca (patch) | |
tree | ba0ae4a209e088640eb06f54248dd7f2d6bdedd3 | |
parent | 1c8df1331125f578ead7ba7123261bfd0e0c5527 (diff) | |
download | markup-validator-bc1bc798dc193d1fcfa65a40be84b2d9f5f4cbca.zip markup-validator-bc1bc798dc193d1fcfa65a40be84b2d9f5f4cbca.tar.gz markup-validator-bc1bc798dc193d1fcfa65a40be84b2d9f5f4cbca.tar.bz2 |
For default auto-detection of charset and doctype, changing the
form so that the values be empty, hence creating validation results URIs like
...check?uri=http%3A%2F%2Fwww.example.org&doctype=&charset=
rather than
...check?uri=http%3A%2F%2Fwww.example.org%2F&charset=%28detect+automatically%29&doctype=Inline
-rwxr-xr-x | htdocs/charset-select.html | 2 | ||||
-rwxr-xr-x | htdocs/doctype-select.html | 2 | ||||
-rwxr-xr-x | httpd/cgi-bin/check | 17 | ||||
-rw-r--r-- | share/templates/en_US/popup_charset.tmpl | 2 | ||||
-rw-r--r-- | share/templates/en_US/popup_doctype.tmpl | 2 |
5 files changed, 15 insertions, 10 deletions
diff --git a/htdocs/charset-select.html b/htdocs/charset-select.html index 61fe346..6a78c68 100755 --- a/htdocs/charset-select.html +++ b/htdocs/charset-select.html @@ -1,5 +1,5 @@ <select id="<!--#echo var="fieldset_id" -->-charset" name="charset"> - <option value="(detect automatically)" selected="selected">(detect automatically)</option> + <option value="" selected="selected">(detect automatically)</option> <option value="utf-8">utf-8 (Unicode, worldwide)</option> <option value="utf-16">utf-16 (Unicode, worldwide)</option> <option value="iso-8859-1">iso-8859-1 (Western Europe)</option> diff --git a/htdocs/doctype-select.html b/htdocs/doctype-select.html index 941dfde..ef9b532 100755 --- a/htdocs/doctype-select.html +++ b/htdocs/doctype-select.html @@ -1,5 +1,5 @@ <select id="<!--#echo var="fieldset_id" -->-doctype" name="doctype"> - <option value="Inline" selected="selected">(detect automatically)</option> + <option value="" selected="selected">(detect automatically)</option> <option value="XHTML 1.0 Strict">XHTML 1.0 Strict</option> <option value="XHTML 1.0 Transitional">XHTML 1.0 Transitional</option> <option value="XHTML 1.0 Frameset">XHTML 1.0 Frameset</option> diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index fd9724e..4883a64 100755 --- a/httpd/cgi-bin/check +++ b/httpd/cgi-bin/check @@ -14,7 +14,7 @@ # This source code is available under the license at: # http://www.w3.org/Consortium/Legal/copyright-software # -# $Id: check,v 1.478 2007-03-14 07:43:50 ot Exp $ +# $Id: check,v 1.479 2007-03-15 06:30:14 ot Exp $ # # Disable buffering on STDOUT! @@ -180,7 +180,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.478 $; + $VERSION = q$Revision: 1.479 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -484,8 +484,12 @@ unless ($File->{Charset}->{Use}) { # # Handle any Fallback or Override for the charset. -if (charset_not_equal($File->{Opt}->{Charset}, '(detect automatically)')) { - # charset=foo was given to the CGI and it wasn't "autodetect". +if ( + charset_not_equal($File->{Opt}->{Charset}, '(detect automatically)') + and + charset_not_equal($File->{Opt}->{Charset}, '') + ) { + # charset=foo was given to the CGI and it wasn't "autodetect" or empty. # # Extract the user-requested charset from CGI param. @@ -581,9 +585,10 @@ if ($File->{Charset}->{Use} eq 'utf-8' && # # -# Override DOCTYPE if user asked for it. +# Override DOCTYPE if user asked for it. if ($File->{Opt}->{DOCTYPE} - and not $File->{Opt}->{DOCTYPE} =~ /(Inline|detect)/i) { + and not $File->{Opt}->{DOCTYPE} =~ /(Inline|detect)/i + and $File->{Opt}->{DOCTYPE} ne '1' ) { $File = &override_doctype($File); } diff --git a/share/templates/en_US/popup_charset.tmpl b/share/templates/en_US/popup_charset.tmpl index 846d80e..035f5ee 100644 --- a/share/templates/en_US/popup_charset.tmpl +++ b/share/templates/en_US/popup_charset.tmpl @@ -1,5 +1,5 @@ <select name="charset" id="charset"> - <option value="(detect automatically)">(detect automatically)</option> + <option value="">(detect automatically)</option> <option value="utf-8" <TMPL_IF NAME="override charset utf-8">selected="selected"</TMPL_IF>>utf-8 (Unicode, worldwide)</option> <option value="utf-16" <TMPL_IF NAME="override charset utf-16">selected="selected"</TMPL_IF>>utf-16 (Unicode, worldwide)</option> <option value="iso-8859-1" <TMPL_IF NAME="override charset iso-8859-1">selected="selected"</TMPL_IF>>iso-8859-1 (Western Europe)</option> diff --git a/share/templates/en_US/popup_doctype.tmpl b/share/templates/en_US/popup_doctype.tmpl index 98aa12b..ad64c04 100644 --- a/share/templates/en_US/popup_doctype.tmpl +++ b/share/templates/en_US/popup_doctype.tmpl @@ -1,5 +1,5 @@ <select id="doctype" name="doctype"> - <option value="Inline">(detect automatically)</option> + <option value="">(detect automatically)</option> <option value="XHTML 1.0 Strict"<TMPL_IF NAME="override doctype XHTML 1.0 Strict">selected="selected"</TMPL_IF>>XHTML 1.0 Strict</option> <option value="XHTML 1.0 Transitional" <TMPL_IF NAME="override doctype XHTML 1.0 Transitional">selected="selected"</TMPL_IF>>XHTML 1.0 Transitional</option> <option value="XHTML 1.0 Frameset" <TMPL_IF NAME="override doctype XHTML 1.0 Frameset">selected="selected"</TMPL_IF>>XHTML 1.0 Frameset</option> |