Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 777e8837

Von Moritz Bunkus vor fast 17 Jahren hinzugefügt

  • ID 777e883798f57271d29f089bb5520bd4d56ad373
  • Vorgänger 3404c3bd
  • Nachfolger d5ccfcf2

Den DOCTYPE nur dann setzen, wenn der Internet Explorer verwendet wird. Andere Browser haben ansonsten Probleme, u.a. mit dem JavaScript-Menü.

Unterschiede anzeigen:

SL/Form.pm
380 380
  my ($stylesheet, $favicon);
381 381

  
382 382
  if ($ENV{HTTP_USER_AGENT}) {
383
    my $doctype;
384

  
385
    if ($ENV{'HTTP_USER_AGENT'} =~ m/MSIE\s+\d/) {
386
      $main::lxdebug->message(0, "yeah");
387
      # Only set the DOCTYPE for Internet Explorer. Other browsers have problems displaying the menu otherwise.
388
      $doctype = qq|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\n|;
389
    } else {
390
      $main::lxdebug->message(0, "nope");
391
    }
383 392

  
384 393
    my $stylesheets = "$self->{stylesheet} $self->{stylesheets}";
385 394

  
......
433 442
    }
434 443
    print qq|Content-Type: text/html; charset=${db_charset};
435 444

  
436
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
437
<html>
445
${doctype}<html>
438 446
<head>
439 447
  <title>$self->{titlebar}</title>
440 448
  $stylesheet

Auch abrufbar als: Unified diff