ckeditor 3.6.3
This commit is contained in:
parent
af351f87d3
commit
094e571b74
217 changed files with 243 additions and 889 deletions
|
@ -263,6 +263,21 @@ def formatNumber(n, sep=',', precision=2, tsep=' '):
|
|||
res += sep + splitted[1]
|
||||
return res
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
xhtmlClassAttr = re.compile('class\s*=\s*".*?"')
|
||||
xhtmlStyleAttr = re.compile('style\s*=\s*".*?"')
|
||||
xhtmlComment = re.compile('<!--.*?-->', re.S)
|
||||
|
||||
def cleanXhtml(s):
|
||||
'''Returns a version of XHTML string p_s where:
|
||||
* attributes "class" and "style" have been removed;
|
||||
* XHTML comments have been removed.
|
||||
'''
|
||||
s = xhtmlClassAttr.sub('', s)
|
||||
s = xhtmlStyleAttr.sub('', s)
|
||||
s = xhtmlComment.sub('', s)
|
||||
return s
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
toLower = {'Ç':'ç','Ù':'ù','Û':'û','Ü':'ü','Î':'î','Ï':'ï','Ô':'ô','Ö':'ö',
|
||||
'É':'é','È':'è','Ê':'ê','Ë':'ë','À':'à','Â':'â','Ä':'ä'}
|
||||
|
|
|
@ -625,7 +625,9 @@ class XmlMarshaller:
|
|||
if fType: res.write(' type="%s"' % fType)
|
||||
# Dump other attributes if needed
|
||||
if fType in ('list', 'tuple'):
|
||||
res.write(' count="%d"' % len(fieldValue))
|
||||
length = 0
|
||||
if fieldValue: length = len(fieldValue)
|
||||
res.write(' count="%d"' % length)
|
||||
if fType == 'file':
|
||||
if hasattr(fieldValue, 'content_type'):
|
||||
res.write(' mimeType="%s"' % fieldValue.content_type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue