diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl
index c2e76c770e5..ce71c89600d 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");
+ }
$STYLESHEET = $FILE.".css" unless $STYLESHEET;
$MY_PARTIAL_HEADER = join('',
($DOCTYPE ? $DTDcomment : ''),
@@ -668,9 +680,7 @@ sub make_head_and_body($$) {
($BASE ? "\n" : ''),
"\n",
- ($FAVORITES_ICON
- ? ("\n")
- : ''),
+ $favicon,
($EXTERNAL_UP_LINK
? ("\n