[MacPorts] #14062: Website does not render properly in IE7
MacPorts
trac at macosforge.org
Thu Jan 24 12:21:30 PST 2008
#14062: Website does not render properly in IE7
----------------------------------+-----------------------------------------
Reporter: wsiegrist at apple.com | Owner: jmpp at macports.org
Type: defect | Status: new
Priority: Normal | Milestone: Website & Documentation
Component: website | Version:
Resolution: | Keywords: ie7 windows content-type
----------------------------------+-----------------------------------------
Comment (by raimue at macports.org):
I have a simple fix here. Just send the pages out as text/html for IE
instead of application/xhtml+xml and it works for me.
{{{
Index: includes/common.inc
===================================================================
--- includes/common.inc (revision 33352)
+++ includes/common.inc (working copy)
@@ -42,8 +42,15 @@
# Page header:
function print_header($title, $encoding) {
global $MPWEB, $trac_url, $svn_url, $downloads, $guide_url;
-
- header("Content-Type: application/xhtml+xml; charset=$encoding");
+
+ # If the User Agent is MSIE, answer as text/html
+ if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
+ $contenttype = 'text/html';
+ } else {
+ $contenttype = 'application/xhtml+xml';
+ }
+
+ header("Content-Type: $contenttype; charset=$encoding");
include("$MPWEB/includes/header.inc");
print_warnings();
}
}}}
--
Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14062#comment:3>
MacPorts </projects/macports>
Ports system for Mac OS
More information about the macports-tickets
mailing list