MSIE 2.0 workaround to not to display "<?xml", MSIE 3.0 not tested & not trusted
authorshort <>
Tue, 14 Aug 2001 18:10:02 +0000 (18:10 +0000)
committershort <>
Tue, 14 Aug 2001 18:10:02 +0000 (18:10 +0000)
common.php

index e72f67b..fac6f37 100644 (file)
@@ -18,6 +18,9 @@
        if (isset($detect_js) && !$have_js)
                $head.='<script type="text/javascript" src="have_js.js"></script>'."\n";
 
+       if (ereg("[[:<:]]MSIE ([0-9]+)\\.",$HTTP_SERVER_VARS["HTTP_USER_AGENT"],$msie_major_a))
+               $msie_major=$msie_major_a[1];
+
 function addpercents($url)
 {
        $r=$c="";
@@ -64,8 +67,9 @@ function footer()
 }
 
        header("Content-type: text/html; charset=iso-8859-2");
+       if (!isset($msie_major) || $msie_major>=4)
+               print('<?xml version="1.0" encoding="iso-8859-2"?>'."\n");
 ?>
-<?xml version="1.0" encoding="iso-8859-2"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">
 <head><title>Energie &amp; peníze<?php