appy.gen: improved cleaning and formatting of XHTML content; appy.pod: added some default appy-related table styles for producing cells with text in bold/normal, aligned right/left, etc.
This commit is contained in:
parent
d3a2b85a10
commit
028040351c
11 changed files with 195 additions and 54 deletions
|
@ -11,8 +11,9 @@ from appy.gen.utils import GroupDescr, Keywords, getClassName, SomeObjects
|
|||
import appy.pod
|
||||
from appy.pod.renderer import Renderer
|
||||
from appy.shared.data import countries
|
||||
from appy.shared.xml_parser import XhtmlCleaner
|
||||
from appy.shared.utils import Traceback, getOsTempFolder, formatNumber, \
|
||||
XhtmlCleaner, FileWrapper, sequenceTypes
|
||||
FileWrapper, sequenceTypes
|
||||
|
||||
# Default Appy permissions -----------------------------------------------------
|
||||
r, w, d = ('read', 'write', 'delete')
|
||||
|
@ -1238,8 +1239,7 @@ class String(Type):
|
|||
# When image upload is allowed, ckeditor inserts some "style" attrs
|
||||
# (ie for image size when images are resized). So in this case we
|
||||
# can't remove style-related information.
|
||||
keepStyles = self.allowImageUpload or self.richText
|
||||
value = XhtmlCleaner.clean(value, keepStyles=keepStyles)
|
||||
value = XhtmlCleaner().clean(value, keepStyles=self.richText)
|
||||
Type.store(self, obj, value)
|
||||
|
||||
def getFormattedValue(self, obj, value):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue