From 777e883798f57271d29f089bb5520bd4d56ad373 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 26 Oct 2007 07:23:30 +0000 Subject: [PATCH] =?utf8?q?Den=20DOCTYPE=20nur=20dann=20setzen,=20wenn=20de?= =?utf8?q?r=20Internet=20Explorer=20verwendet=20wird.=20Andere=20Browser?= =?utf8?q?=20haben=20ansonsten=20Probleme,=20u.a.=20mit=20dem=20JavaScript?= =?utf8?q?-Men=C3=BC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Form.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/SL/Form.pm b/SL/Form.pm index e4c4dd5b7..d3bd19c64 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -380,6 +380,15 @@ sub header { my ($stylesheet, $favicon); if ($ENV{HTTP_USER_AGENT}) { + my $doctype; + + if ($ENV{'HTTP_USER_AGENT'} =~ m/MSIE\s+\d/) { + $main::lxdebug->message(0, "yeah"); + # Only set the DOCTYPE for Internet Explorer. Other browsers have problems displaying the menu otherwise. + $doctype = qq|\n|; + } else { + $main::lxdebug->message(0, "nope"); + } my $stylesheets = "$self->{stylesheet} $self->{stylesheets}"; @@ -433,8 +442,7 @@ sub header { } print qq|Content-Type: text/html; charset=${db_charset}; - - +${doctype} $self->{titlebar} $stylesheet -- 2.20.1