Bugfixes for IE.

This commit is contained in:
Gaetan Delannay 2014-01-20 18:43:18 +01:00
parent 3b9c078fbb
commit b9dcc94bdb
2 changed files with 9 additions and 6 deletions

View file

@ -192,7 +192,7 @@ class AbstractWrapper(object):
</tr>
<!-- The user strip -->
<tr height="33px">
<tr height="28px">
<td>
<table class="userStrip">
<tr>
@ -259,7 +259,7 @@ class AbstractWrapper(object):
<tr height="26px" if="zobj and showPortlet and (layoutType != 'edit')">
<td>:obj.pxNavigationStrip</td>
</tr>
<tr>
<tr valign="top">
<td>
<table width="100%" height="100%" cellpadding="0" cellspacing="0">
<tr valign="top">

View file

@ -40,6 +40,8 @@ CUSTOM_CONVERSION_ERROR = 'Custom converter for "%s" values produced an ' \
'error while converting value "%s". %s'
XML_SPECIAL_CHARS = {'<': '&lt;', '>': '&gt;', '&': '&amp;', '"': '&quot;',
"'": '&apos;'}
XML_SPECIAL_CHARS_NO_APOS = XML_SPECIAL_CHARS.copy()
del XML_SPECIAL_CHARS_NO_APOS["'"]
XML_ENTITIES = {'lt': '<', 'gt': '>', 'amp': '&', 'quot': '"', 'apos': "'"}
HTML_ENTITIES = {
'iexcl': '¡', 'cent': '¢', 'pound': '£', 'curren': '', 'yen': '¥',
@ -81,8 +83,9 @@ def escapeXml(s, format='xml', nsText='text'):
res = ''
odf = format == 'odf'
for c in s:
if XML_SPECIAL_CHARS.has_key(c):
res += XML_SPECIAL_CHARS[c]
if XML_SPECIAL_CHARS_NO_APOS.has_key(c):
# We do not escape 'apos': there is no particular need for that.
res += XML_SPECIAL_CHARS_NO_APOS[c]
elif odf and (c == '\n'):
res += '<%s:line-break/>' % nsText
elif odf and (c == '\r'):
@ -99,8 +102,8 @@ def escapeXhtml(s):
else:
res = ''
for c in s:
if XML_SPECIAL_CHARS.has_key(c):
res += XML_SPECIAL_CHARS[c]
if XML_SPECIAL_CHARS_NO_APOS.has_key(c):
res += XML_SPECIAL_CHARS_NO_APOS[c]
elif c == '\n':
res += '<br/>'
elif c == '\r':