summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--htdocs/config/validator.conf4
-rwxr-xr-xhtdocs/docs/errors.html8
-rwxr-xr-xhtdocs/docs/install.html2
-rw-r--r--htdocs/docs/install_win.html6
-rwxr-xr-xhttpd/cgi-bin/check17
-rwxr-xr-xmisc/docs_errors.pl2
-rw-r--r--misc/w3c-markup-validator.spec3
-rw-r--r--share/templates/en_US/earl_xml.tmpl8
-rw-r--r--share/templates/en_US/error_messages.cfg10
-rw-r--r--share/templates/en_US/soap_output.tmpl2
-rw-r--r--share/templates/en_US/ucn_output.tmpl4
-rw-r--r--share/templates/en_US/valid.tmpl4
12 files changed, 30 insertions, 40 deletions
diff --git a/htdocs/config/validator.conf b/htdocs/config/validator.conf
index 1b61779..0c37dbc 100644
--- a/htdocs/config/validator.conf
+++ b/htdocs/config/validator.conf
@@ -79,10 +79,6 @@ Max Recursion = 0
# Email address of the maintainer of this service.
Maintainer = www-validator@w3.org
-#
-# The "Home Page" for the service. Make sure this ends with a slash.
-Home Page = http://validator.w3.org/
-
# Localization
# only English available for now
Languages = en
diff --git a/htdocs/docs/errors.html b/htdocs/docs/errors.html
index 7a99481..9f30968 100755
--- a/htdocs/docs/errors.html
+++ b/htdocs/docs/errors.html
@@ -74,7 +74,7 @@
<dt id="ve-47">47: end of document in prolog</dt>
<dd><div class="ve mid-47">
<p>
- This error may appear when the validator receives an empty document. Please make sure that the document you are uploading is not empty, and <a href="http://validator.w3.org/feedback.html">report</a> any discrepancy.
+ This error may appear when the validator receives an empty document. Please make sure that the document you are uploading is not empty, and <a href="<!--#echo var="relroot" -->feedback.html">report</a> any discrepancy.
</p>
</div>
<p>
@@ -272,7 +272,7 @@
</p>
<p>
If this error occurred in a script section of your document, you should probably
- read this <a href="http://validator.w3.org/docs/help.html#faq-javascript">FAQ entry</a>.
+ read this <a href="<!--#echo var="relroot" -->docs/help.html#faq-javascript">FAQ entry</a>.
</p>
</div>
<p>
@@ -357,7 +357,7 @@
check that they are both allowed in the chosen document type, and/or
use CSS instead of this attribute. If you received this error when using the
&lt;embed&gt; element to incorporate flash media in a Web page, see the
- <a href="http://validator.w3.org/docs/help.html#faq-flash">FAQ item on valid flash</a>.
+ <a href="<!--#echo var="relroot" -->docs/help.html#faq-flash">FAQ item on valid flash</a>.
</p>
</div>
<p>
@@ -622,7 +622,7 @@
<dt id="ve-187">187: no document type declaration; will parse without validation</dt>
<dd><div class="ve mid-187">
<p>The document type could not be determined, because the document had no correct DOCTYPE declaration. The document does not look like HTML, therefore automatic fallback could not be performed, and the document was only checked against basic markup syntax.</p>
- <p>Learn <a href="http://validator.w3.org/docs/help.html#faq-doctype">how to add a doctype to your document</a>
+ <p>Learn <a href="<!--#echo var="relroot" -->docs/help.html#faq-doctype">how to add a doctype to your document</a>
from our <acronym title="Frequently Asked Questions">FAQ</acronym>, or use the validator's
<code>Document Type</code> option to validate your document against a specific Document Type.</p>
</div>
diff --git a/htdocs/docs/install.html b/htdocs/docs/install.html
index 6e6ecd8..5172a63 100755
--- a/htdocs/docs/install.html
+++ b/htdocs/docs/install.html
@@ -306,7 +306,7 @@ HTML5 = http://localhost:8888/html5/
<dd>
The validator's <strong>main configuration file</strong>. This will
generally be the only file you need to edit. It sets various parameters, such as:
- the address of the maintainer, the URL for the "Home Page", various file paths and locations,
+ the address of the maintainer, various file paths and locations,
whether the <a href="api.html">API</a> is enabled, etc.
</dd>
<dt>charset.cfg</dt>
diff --git a/htdocs/docs/install_win.html b/htdocs/docs/install_win.html
index 00cd09c..2377ed6 100644
--- a/htdocs/docs/install_win.html
+++ b/htdocs/docs/install_win.html
@@ -257,8 +257,6 @@ Include conf/extra/httpd-manual.conf
is declared. Notice that slashes are used here instead of
windows-like back slashes.</p>
-<p>The option <code>Home Page</code> has to be changed to the URL of
- the validator, http://validator.example.org/ in our case.</p>
<p>The last option that has to be modified is Allow Private
<code>IPs = { no | yes }</code>. It must be set to
&quot;yes&quot;. Otherwise, you cannot validate files
@@ -338,10 +336,6 @@ Max Recursion = 0
# Email address of the maintainer of this service.
Maintainer = www-validator@w3.org
-#
-# The &quot;Home Page&quot; for the service. Make sure this ends with a slash.
-Home Page = http://validator.example.org/
-
# Localization
# only English available for now
Languages = en
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index f458b01..8cb4d06 100755
--- a/httpd/cgi-bin/check
+++ b/httpd/cgi-bin/check
@@ -838,7 +838,7 @@ sub get_template ($$;@)
filename => $fname,
@opts
);
- $tmpl->param(cfg_home_page => $CFG->{'Home Page'});
+ $tmpl->param(env_home_page => $File->{Env}->{'Home Page'});
$tmpl->param(validator_version => $VERSION);
$File->{_Templates}->{$fname} = $tmpl;
}
@@ -1427,7 +1427,7 @@ sub prep_template ($$)
#
# The URI...
- $T->param(file_uri => $File->{URI});
+ $T->param(file_uri => $File->{URI});
#
# Set URL for page title.
@@ -2013,7 +2013,7 @@ sub check_recursion ($$)
return unless $lvl =~ m/^\d+$/; # Non-digit, i.e. garbage, ignore.
if ($lvl >= $CFG->{'Max Recursion'}) {
- print redirect $CFG->{'Home Page'};
+ print redirect $File->{Env}->{'Home Page'};
}
else {
@@ -2396,10 +2396,10 @@ sub report_errors ($)
my $escaped_uri = uri_escape($File->{URI});
$_msg =~ s/<!--URI-->/$escaped_uri/g;
}
- $explanation =
- " $_msg\n$explanation"; # The send feedback plea.
- $explanation =~
- s/<!--CFG_HOME_PAGE-->/$CFG->{'Home Page'}/g;
+
+ # The send feedback plea.
+ $explanation = " $_msg\n$explanation";
+ $explanation =~ s/<!--#echo\s+var="relroot"\s*-->//g;
}
$err->{expl} = $explanation;
}
@@ -2787,6 +2787,9 @@ sub prepCGI
exit;
}
+ $File->{Env}->{'Home Page'} =
+ URI->new_abs(".", $File->{Env}->{'Self URI'});
+
# Use "url" unless a "uri" was also given.
if ($q->param('url') and not $q->param('uri')) {
$q->param('uri', $q->param('url'));
diff --git a/misc/docs_errors.pl b/misc/docs_errors.pl
index 2a252d0..274d4b3 100755
--- a/misc/docs_errors.pl
+++ b/misc/docs_errors.pl
@@ -96,8 +96,6 @@ sub list_errors_hasverbose
$single_error{original} = $original;
$single_error{id} = $error_id;
$single_error{verbose} = $rsrc->{msg}->{$error_id}->{verbose};
- $single_error{verbose} =~
- s/<!--CFG_HOME_PAGE-->/$CFG->{'Home Page'}/g;
push @{$errors}, \%single_error;
diff --git a/misc/w3c-markup-validator.spec b/misc/w3c-markup-validator.spec
index ef63c21..0f0e3b4 100644
--- a/misc/w3c-markup-validator.spec
+++ b/misc/w3c-markup-validator.spec
@@ -43,8 +43,7 @@ mv validator-%{version}/htdocs/sgml-lib .
%{__perl} -pi -e \
's|^(\s*Library\s*=\s*).*|${1}%{_datadir}/sgml/%{name}| ;
s|^(\s*TidyConf\s*=\s*).*|${1}%{_sysconfdir}/w3c/tidy.conf| ;
- s|\bwww-validator\@w3\.org\b|root\@localhost| ;
- s|/validator\.w3\.org/|/localhost/w3c-validator/|' \
+ s|\bwww-validator\@w3\.org\b|root\@localhost|' \
htdocs/config/validator.conf
# Move config out of the way
diff --git a/share/templates/en_US/earl_xml.tmpl b/share/templates/en_US/earl_xml.tmpl
index 1b098a5..4384fdc 100644
--- a/share/templates/en_US/earl_xml.tmpl
+++ b/share/templates/en_US/earl_xml.tmpl
@@ -13,13 +13,13 @@ X-W3C-Validator-Warnings: <TMPL_VAR NAME="valid_warnings_num" ESCAPE="NONE"></TM
xmlns:ptr="http://www.w3.org/2009/pointers#"
xmlns="http://www.w3.org/ns/earl#">
- <Software rdf:about="<TMPL_VAR NAME="cfg_home_page">about.html">
+ <Software rdf:about="<TMPL_VAR NAME="env_home_page">about.html">
<dct:title xml:lang="en">W3C Markup Validation Service</dct:title>
<dct:description xml:lang="en">
The W3C Markup Validation Service is a free service by W3C that helps
check the validity of Web documents.
</dct:description>
- <foaf:homepage><TMPL_VAR NAME="cfg_home_page"></foaf:homepage>
+ <foaf:homepage><TMPL_VAR NAME="env_home_page"></foaf:homepage>
<dct:hasVersion><TMPL_VAR NAME="validator_version"></dct:hasVersion>
</Software>
@@ -29,7 +29,7 @@ X-W3C-Validator-Warnings: <TMPL_VAR NAME="valid_warnings_num" ESCAPE="NONE"></TM
<TMPL_IF NAME="VALID">
<Assertion>
- <assertedBy rdf:resource="<TMPL_VAR NAME="cfg_home_page">about.html"/>
+ <assertedBy rdf:resource="<TMPL_VAR NAME="env_home_page">about.html"/>
<test rdf:resource="http://www.w3.org/Markup/"/>
<subject rdf:resource="<TMPL_VAR NAME="file_uri">"/>
<mode rdf:resource="http://www.w3.org/ns/earl#automatic"/>
@@ -38,7 +38,7 @@ X-W3C-Validator-Warnings: <TMPL_VAR NAME="valid_warnings_num" ESCAPE="NONE"></TM
<TMPL_ELSE>
<TMPL_LOOP NAME="file_errors">
<Assertion rdf:ID="assert<TMPL_VAR NAME="__counter__">">
- <assertedBy rdf:resource="<TMPL_VAR NAME="cfg_home_page">about.html"/>
+ <assertedBy rdf:resource="<TMPL_VAR NAME="env_home_page">about.html"/>
<subject rdf:resource="<TMPL_VAR NAME="file_uri">"/>
<mode rdf:resource="http://www.w3.org/ns/earl#automatic"/>
<test rdf:resource="http://www.w3.org/Markup/"/>
diff --git a/share/templates/en_US/error_messages.cfg b/share/templates/en_US/error_messages.cfg
index 0d54470..7ba6da1 100644
--- a/share/templates/en_US/error_messages.cfg
+++ b/share/templates/en_US/error_messages.cfg
@@ -8,7 +8,7 @@
verbose = <<.EOF.
<p class="helpwanted">
<a
- href="<!--CFG_HOME_PAGE-->feedback.html?uri=<!--URI-->;errmsg_id=<!--MID-->#errormsg"
+ href="<!--#echo var="relroot" -->feedback.html?uri=<!--URI-->;errmsg_id=<!--MID-->#errormsg"
title="Suggest improvements on this error message through our feedback channels"
>&#x2709;</a>
</p>
@@ -204,7 +204,7 @@
verbose <<.EOF.
<div class="ve mid-47">
<p>
- This error may appear when the validator receives an empty document. Please make sure that the document you are uploading is not empty, and <a href="<!--CFG_HOME_PAGE-->feedback.html">report</a> any discrepancy.
+ This error may appear when the validator receives an empty document. Please make sure that the document you are uploading is not empty, and <a href="<!--#echo var="relroot" -->feedback.html">report</a> any discrepancy.
</p>
</div>
.EOF.
@@ -449,7 +449,7 @@
</p>
<p>
If this error occurred in a script section of your document, you should probably
- read this <a href="<!--CFG_HOME_PAGE-->docs/help.html#faq-javascript">FAQ entry</a>.
+ read this <a href="<!--#echo var="relroot" -->docs/help.html#faq-javascript">FAQ entry</a>.
</p>
</div>
.EOF.
@@ -598,7 +598,7 @@
check that they are both allowed in the chosen document type, and/or
use CSS instead of this attribute. If you received this error when using the
&lt;embed&gt; element to incorporate flash media in a Web page, see the
- <a href="<!--CFG_HOME_PAGE-->docs/help.html#faq-flash">FAQ item on valid flash</a>.
+ <a href="<!--#echo var="relroot" -->docs/help.html#faq-flash">FAQ item on valid flash</a>.
</p>
</div>
.EOF.
@@ -1026,7 +1026,7 @@
verbose <<.EOF.
<div class="ve mid-187">
<p>The document type could not be determined, because the document had no correct DOCTYPE declaration. The document does not look like HTML, therefore automatic fallback could not be performed, and the document was only checked against basic markup syntax.</p>
- <p>Learn <a href="<!--CFG_HOME_PAGE-->docs/help.html#faq-doctype">how to add a doctype to your document</a>
+ <p>Learn <a href="<!--#echo var="relroot" -->docs/help.html#faq-doctype">how to add a doctype to your document</a>
from our <acronym title="Frequently Asked Questions">FAQ</acronym>, or use the validator's
<code>Document Type</code> option to validate your document against a specific Document Type.</p>
</div>
diff --git a/share/templates/en_US/soap_output.tmpl b/share/templates/en_US/soap_output.tmpl
index 482b01b..238e5c4 100644
--- a/share/templates/en_US/soap_output.tmpl
+++ b/share/templates/en_US/soap_output.tmpl
@@ -13,7 +13,7 @@ X-W3C-Validator-Warnings: <TMPL_VAR NAME="valid_warnings_num"></TMPL_IF>
<TMPL_LOOP NAME="debug"><m:debug name="<TMPL_VAR NAME="name" ESCAPE="HTML">"><TMPL_VAR NAME="value" ESCAPE="HTML" DEFAULT="(undefined)"></m:debug>
</TMPL_LOOP></TMPL_IF>
<m:uri><TMPL_VAR NAME="file_uri" ESCAPE="HTML"></m:uri>
- <m:checkedby><TMPL_VAR NAME="cfg_home_page" ESCAPE="HTML"></m:checkedby>
+ <m:checkedby><TMPL_VAR NAME="env_home_page" ESCAPE="HTML"></m:checkedby>
<m:doctype><TMPL_VAR NAME="file_doctype" ESCAPE="HTML"></m:doctype>
<m:charset><TMPL_VAR NAME="file_charset" ESCAPE="HTML"></m:charset>
<m:validity><TMPL_IF NAME="VALID">true<TMPL_ELSE>false</TMPL_IF></m:validity>
diff --git a/share/templates/en_US/ucn_output.tmpl b/share/templates/en_US/ucn_output.tmpl
index 2b60a82..5cff656 100644
--- a/share/templates/en_US/ucn_output.tmpl
+++ b/share/templates/en_US/ucn_output.tmpl
@@ -60,7 +60,7 @@ X-W3C-Validator-Warnings: <TMPL_VAR NAME="valid_warnings_num"></TMPL_IF>
<pre><code>&lt;p<TMPL_IF NAME="badge_rdfa"> about=""
resource="<TMPL_VAR NAME="badge_rdfa">"
rel="dc:conformsTo" xmlns:dc="http://purl.org/dc/terms/"</TMPL_IF>&gt;
- &lt;a href="<TMPL_VAR NAME="cfg_home_page" ESCAPE="HTML">check?uri=referer"&gt;
+ &lt;a href="<TMPL_VAR NAME="env_home_page" ESCAPE="HTML">check?uri=referer"&gt;
&lt;img src="<TMPL_VAR NAME="badge_uri" ESCAPE="HTML">"
<TMPL_IF NAME="badge_alt">alt="<TMPL_VAR NAME="badge_alt" ESCAPE="HTML">"</TMPL_IF>
style="<TMPL_IF NAME="badge_h">height: <TMPL_VAR NAME="badge_h">px;</TMPL_IF> <TMPL_IF NAME="badge_w">width: <TMPL_VAR NAME="badge_w">px;</TMPL_IF> border:0"<TMPL_VAR NAME="badge_tagc">&gt;
@@ -76,7 +76,7 @@ X-W3C-Validator-Warnings: <TMPL_VAR NAME="valid_warnings_num"></TMPL_IF>
<pre><code>&lt;p<TMPL_IF NAME="badge_rdfa"> about=""
resource="<TMPL_VAR NAME="badge_rdfa">"
rel="dc:conformsTo" xmlns:dc="http://purl.org/dc/terms/"</TMPL_IF>&gt;
- &lt;a href="<TMPL_VAR NAME="cfg_home_page" ESCAPE="HTML">check?uri=referer"&gt;
+ &lt;a href="<TMPL_VAR NAME="env_home_page" ESCAPE="HTML">check?uri=referer"&gt;
&lt;img src="<TMPL_VAR NAME="badge_alt_uri" ESCAPE="HTML">"
<TMPL_IF NAME="badge_alt">alt="<TMPL_VAR NAME="badge_alt" ESCAPE="HTML">"</TMPL_IF>
style="<TMPL_IF NAME="badge_h">height: <TMPL_VAR NAME="badge_h">px;</TMPL_IF> <TMPL_IF NAME="badge_w">width: <TMPL_VAR NAME="badge_w">px;</TMPL_IF> border:0"<TMPL_VAR NAME="badge_tagc">&gt;
diff --git a/share/templates/en_US/valid.tmpl b/share/templates/en_US/valid.tmpl
index 3117ef8..3ae80ab 100644
--- a/share/templates/en_US/valid.tmpl
+++ b/share/templates/en_US/valid.tmpl
@@ -70,7 +70,7 @@
&lt;p<TMPL_IF NAME="badge_rdfa"> about=""
resource="<TMPL_VAR NAME="badge_rdfa">"
rel="dc:conformsTo" xmlns:dc="http://purl.org/dc/terms/"</TMPL_IF>&gt;
- &lt;a href="<TMPL_VAR NAME="cfg_home_page" ESCAPE="HTML">check?uri=referer"&gt;&lt;img
+ &lt;a href="<TMPL_VAR NAME="env_home_page" ESCAPE="HTML">check?uri=referer"&gt;&lt;img
src="<TMPL_VAR NAME="badge_uri" ESCAPE="HTML">"
<TMPL_IF NAME="badge_alt">alt="<TMPL_VAR NAME="badge_alt" ESCAPE="HTML">"</TMPL_IF> <TMPL_IF NAME="badge_h">height="<TMPL_VAR NAME="badge_h">"</TMPL_IF> <TMPL_IF NAME="badge_w">width="<TMPL_VAR NAME="badge_w">"</TMPL_IF><TMPL_VAR NAME="badge_tagc">&gt;&lt;/a&gt;
&lt;/p&gt;
@@ -85,7 +85,7 @@
&lt;p<TMPL_IF NAME="badge_rdfa"> about=""
resource="<TMPL_VAR NAME="badge_rdfa">"
rel="dc:conformsTo" xmlns:dc="http://purl.org/dc/terms/"</TMPL_IF>&gt;
- &lt;a href="<TMPL_VAR NAME="cfg_home_page" ESCAPE="HTML">check?uri=referer"&gt;&lt;img
+ &lt;a href="<TMPL_VAR NAME="env_home_page" ESCAPE="HTML">check?uri=referer"&gt;&lt;img
src="<TMPL_VAR NAME="badge_alt_uri" ESCAPE="HTML">"
<TMPL_IF NAME="badge_alt">alt="<TMPL_VAR NAME="badge_alt" ESCAPE="HTML">"</TMPL_IF> <TMPL_IF NAME="badge_h">height="<TMPL_VAR NAME="badge_h">"</TMPL_IF> <TMPL_IF NAME="badge_w">width="<TMPL_VAR NAME="badge_w">"</TMPL_IF><TMPL_VAR NAME="badge_tagc">&gt;&lt;/a&gt;
&lt;/p&gt;