# HG changeset patch
# User Rémi Cardona <remi.cardona@logilab.fr>
# Date 1422004028 -3600
# Fri Jan 23 10:07:08 2015 +0100
# Node ID bf53a55fcd9ad0d1d551382f8cf3f96495e8d133
# Parent cb22df23c857a47d6a9ebb86fe43035fc9685a54
[basetemplates] Unbreak IE (closes #4739799)
The X-UA-Compatible directive forces IE9+ to go into IE8 mode, which
never actually behaves like IE8 and actively breaks everything (b0rked
layout, missing text, dysfunctional forms, etc).
Also remove html5.js as it's not shipped anywhere.
# User Rémi Cardona <remi.cardona@logilab.fr>
# Date 1422004028 -3600
# Fri Jan 23 10:07:08 2015 +0100
# Node ID bf53a55fcd9ad0d1d551382f8cf3f96495e8d133
# Parent cb22df23c857a47d6a9ebb86fe43035fc9685a54
[basetemplates] Unbreak IE (closes #4739799)
The X-UA-Compatible directive forces IE9+ to go into IE8 mode, which
never actually behaves like IE8 and actively breaks everything (b0rked
layout, missing text, dysfunctional forms, etc).
Also remove html5.js as it's not shipped anywhere.
@@ -40,25 +40,17 @@
1 def template_html_header(self, content_type, page_title, 2 additional_headers=()): 3 w = self.whead 4 lang = self._cw.lang 5 self.write_doctype() 6 - # explictly close the <base> tag to avoid IE 6 bugs while browsing DOM 7 self._cw.html_headers.define_var('BASE_URL', self._cw.base_url()) 8 self._cw.html_headers.define_var('DATA_URL', self._cw.datadir_url) 9 w(u'<meta http-equiv="content-type" content="%s; charset=%s"/>\n' 10 % (content_type, self._cw.encoding)) 11 w(u'<meta name="viewport" content="initial-scale=1.0; ' 12 u'maximum-scale=1.0; width=device-width; "/>') 13 w(u'\n'.join(additional_headers) + u'\n') 14 - # FIXME this is a quick option to make cw work in IE9 15 - # you'll lose all IE9 functionality, the browser will act as IE8. 16 - w(u'<meta http-equiv="X-UA-Compatible" content="IE=8" />\n') 17 - w(u'<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->\n' 18 - u' <!--[if lt IE 9]>\n' 19 - u' <script src="%s"></script>\n' 20 - u' <![endif]-->\n' % self._cw.data_url('js/html5.js')) 21 self.wview('htmlheader', rset=self.cw_rset) 22 if page_title: 23 w(u'<title>%s</title>\n' % xml_escape(page_title)) 24 25 @monkeypatch(basetemplates.TheMainTemplate)