summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorot <ot@localhost>2007-03-02 07:08:16 +0000
committerot <ot@localhost>2007-03-02 07:08:16 +0000
commitd21b951c947fb4b2b32d6b5be1e5e402b4433149 (patch)
tree79b3e9263ac791a436cd8bc9ee42cc48d1b6f7dd
parentcdcdc7508ff7087d391ffa46c5a61f2013efd779 (diff)
downloadmarkup-validator-d21b951c947fb4b2b32d6b5be1e5e402b4433149.zip
markup-validator-d21b951c947fb4b2b32d6b5be1e5e402b4433149.tar.gz
markup-validator-d21b951c947fb4b2b32d6b5be1e5e402b4433149.tar.bz2
Should not hardcode tidy conf path, make it configurable in main conf file
-rw-r--r--htdocs/config/validator.conf5
-rwxr-xr-xhttpd/cgi-bin/check8
2 files changed, 8 insertions, 5 deletions
diff --git a/htdocs/config/validator.conf b/htdocs/config/validator.conf
index acde331..13e8dc7 100644
--- a/htdocs/config/validator.conf
+++ b/htdocs/config/validator.conf
@@ -1,7 +1,7 @@
#
# Main Configuration File for the W3C Markup Validation Service.
#
-# $Id: validator.conf,v 1.26 2006-11-13 04:13:52 ot Exp $
+# $Id: validator.conf,v 1.27 2007-03-02 07:08:16 ot Exp $
#
# See 'perldoc Config::General' for the syntax, and be aware that the
# 'SplitPolicy' is 'equalsign', ie. keys and values are separated by '\s*=\s*',
@@ -27,6 +27,9 @@
# Location of template files
Templates = $Base/share/templates
+ # configuration file for HTML Tidy Module, if available
+ TidyConf = $Base/htdocs/config/tidy.conf
+
<SGML>
#
# The SGML Library Path.
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index a84bcee..8ef4627 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.471 2007-03-01 02:52:56 ot Exp $
+# $Id: check,v 1.472 2007-03-02 07:08:16 ot Exp $
#
# Disable buffering on STDOUT!
@@ -180,7 +180,7 @@ Directory not readable (permission denied): @_r
#
# Strings
- $VERSION = q$Revision: 1.471 $;
+ $VERSION = q$Revision: 1.472 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
#
@@ -694,7 +694,7 @@ if (! $File->{'Is Valid'}) {
eval {
local $SIG{__DIE__};
require HTML::Tidy;
- my $tidy = HTML::Tidy->new({config_file => "/Users/ot/Sites/cvs/public/validator/HEAD/htdocs/config/tidy.conf"});
+ my $tidy = HTML::Tidy->new({config_file => $CFG->{Paths}->{TidyConf}});
$File->{'Tidy'} = $tidy->clean(join"\n",@{$File->{Content}});
$File->{'Tidy_OK'} = TRUE;
@@ -702,9 +702,9 @@ if (! $File->{'Is Valid'}) {
if ($@) {
$File->{'Tidy_OK'} = FALSE;
}
-
}
+
my $template;
if ($File->{Opt}->{Output} eq 'xml') {