diff options
author | Fred Drake <fdrake@acm.org> | 2004-11-05 05:06:08 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2004-11-05 05:06:08 (GMT) |
commit | 0384be3b079ef7e3ee39025ae99025514b367aa6 (patch) | |
tree | da073aafb16dcdc83e5dc9fdf3db3205e7ea6af4 /Doc/perl | |
parent | 6e2e90d1602479769f4a3ba7dc27a57fbd2c899f (diff) | |
download | cpython-0384be3b079ef7e3ee39025ae99025514b367aa6.zip cpython-0384be3b079ef7e3ee39025ae99025514b367aa6.tar.gz cpython-0384be3b079ef7e3ee39025ae99025514b367aa6.tar.bz2 |
generate the "type" attribute on the favicon link
Diffstat (limited to 'Doc/perl')
-rw-r--r-- | Doc/perl/l2hinit.perl | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl index c2e76c7..ce71c89 100644 --- a/Doc/perl/l2hinit.perl +++ b/Doc/perl/l2hinit.perl @@ -661,6 +661,18 @@ sub make_head_and_body($$) { . ($ISO_LANGUAGE ? $ISO_LANGUAGE : $isolanguage) . "\">\n"; } if ($MY_PARTIAL_HEADER eq '') { + my $favicon = ''; + if ($FAVORITES_ICON) { + my($myname, $mydir, $myext) = fileparse($FAVORITES_ICON, '\..*'); + my $favtype = ''; + if ($myext eq '.gif' || $myext eq '.png') { + $myext =~ s/^[.]//; + $favtype = " type=\"image/$myext\""; + } + $favicon = ( + "\n<link rel=\"SHORTCUT ICON\" href=\"$FAVORITES_ICON\"" + . "$favtype />"); + } $STYLESHEET = $FILE.".css" unless $STYLESHEET; $MY_PARTIAL_HEADER = join('', ($DOCTYPE ? $DTDcomment : ''), @@ -668,9 +680,7 @@ sub make_head_and_body($$) { ($BASE ? "\n<base href=\"$BASE\" />" : ''), "\n<link rel=\"STYLESHEET\" href=\"$STYLESHEET\" type='text/css'", " />", - ($FAVORITES_ICON - ? ("\n<link rel=\"SHORTCUT ICON\" href=\"$FAVORITES_ICON\" />") - : ''), + $favicon, ($EXTERNAL_UP_LINK ? ("\n<link rel='start' href='" . $EXTERNAL_UP_LINK . ($EXTERNAL_UP_TITLE ? |