[Pkg-doc-linux-devel] r223 - trunk/website
Frank Lichtenheld
djpig at costa.debian.org
Thu Sep 28 15:02:21 UTC 2006
Author: djpig
Date: 2006-09-28 15:02:20 +0000 (Thu, 28 Sep 2006)
New Revision: 223
Modified:
trunk/website/create_index_pages.pl
Log:
Correctly escape the license texts.
Add some useful navigational links at the top of each page.
Modified: trunk/website/create_index_pages.pl
===================================================================
--- trunk/website/create_index_pages.pl 2006-09-28 15:00:39 UTC (rev 222)
+++ trunk/website/create_index_pages.pl 2006-09-28 15:02:20 UTC (rev 223)
@@ -4,6 +4,7 @@
use warnings;
use CGI qw( :standard );
+use HTML::Entities;
my $dir = $ARGV[0];
my $html_dir = $ARGV[1];
@@ -47,13 +48,14 @@
while (<LICENSE>) {
$text .= $_;
}
- push @licensetexts, $text || 'N/A';
+ push @licensetexts, encode_entities($text) || 'N/A';
}
print "Create File $html_dir/cat_$category.html\n";
open CATFILE, '>', "$html_dir/cat_$category.html"
or die "couldn't open $html_dir/cat_$category.html: $!";
print CATFILE start_html("$category HOWTO licenses");
+ print CATFILE p( a({-href=>"index.html"},'Home') );
print CATFILE h1("$category HOWTO licenses");
print CATFILE p( "Follow the links to get a list of HOWTOs currently distributed under the license. There are currently $howtos HOWTOs in this category." );
print CATFILE ul(li( [ map { a({-href=>"lic_$_.html"},$_)." (".scalar(@{$howtos{$_}}).")"} sort @licenses ] ));
@@ -65,6 +67,8 @@
open LICFILE, '>', "$html_dir/lic_$licenses[$_].html"
or die "couldn't open $html_dir/lic_$licenses[$_].html: $!";
print LICFILE start_html($licenses[$_]);
+ print LICFILE p( a({-href=>"index.html"},'Home'), " >> ",
+ a({-href=>"cat_$category.html"},$category) );
print LICFILE h1($licenses[$_]);
print LICFILE ul( li( [ sort @{$howtos{$licenses[$_]}} ] ) );
print LICFILE pre( $licensetexts[$_] );
More information about the Pkg-doc-linux-devel
mailing list