validator/httpd/cgi-bin check,1.744,1.745

Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv1901/httpd/cgi-bin

Modified Files:
	check 
Log Message:
Update EARL/RDF output to EARL 1.0 20091029 Working Draft.

Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.744
retrieving revision 1.745
diff -u -d -r1.744 -r1.745
--- check	5 Dec 2009 10:05:35 -0000	1.744
+++ check	5 Dec 2009 10:22:04 -0000	1.745
@@ -901,14 +901,16 @@
 }
 
 my %templates = (
-    earl => 'earl_xml.tmpl',
-    n3   => 'earl_n3.tmpl',
-    json => 'json_output.tmpl',
-    ucn  => 'ucn_output.tmpl',
+    earl => ['earl_xml.tmpl', default_escape => 'HTML'],
+    n3   => ['earl_n3.tmpl'],
+    json => ['json_output.tmpl'],
+    ucn  => ['ucn_output.tmpl'],
 );
 my $template = $templates{$File->{Opt}->{Output}};
 if ($template) {
-    $template = &get_template($File, $template);
+    my $tname = shift(@$template);
+    my $tmpl = &get_template($File, $tname, @$template);
+    $template = $tmpl;
 }
 elsif ($File->{Opt}->{Output} eq 'soap12') {
     if ($CFG->{'Enable SOAP'} != 1) {
@@ -980,12 +982,15 @@
 # Subroutine definitions
 #############################################################################
 
-sub get_template ($$)
+sub get_template ($$;@)
 {
-    my ($File, $fname) = @_;
+    my ($File, $fname, @opts) = @_;
     if (!$File->{_Templates}->{$fname}) {
-        my $tmpl = HTML::Template->new(%{$File->{Template_Defaults}},
-            filename => $fname);
+        my $tmpl = HTML::Template->new(
+            %{$File->{Template_Defaults}},
+            filename => $fname,
+            @opts
+        );
         $tmpl->param(cfg_home_page     => $CFG->{'Home Page'});
         $tmpl->param(validator_version => $VERSION);
         $File->{_Templates}->{$fname} = $tmpl;

Received on Saturday, 5 December 2009 10:22:11 UTC