1.1 --- a/XSLForms/Fields.py Tue Jun 05 23:17:54 2007 +0000
1.2 +++ b/XSLForms/Fields.py Tue Jun 05 23:18:56 2007 +0000
1.3 @@ -121,7 +121,9 @@
1.4 if type(value) == type(""):
1.5 value = unicode(value, encoding=self.encoding)
1.6
1.7 - node.setAttributeNS(EMPTY_NAMESPACE, t[0], value)
1.8 + # Remove CR characters.
1.9 +
1.10 + node.setAttributeNS(EMPTY_NAMESPACE, t[0], value.replace("\r", ""))
1.11 break
1.12
1.13 elif len(t) == 2:
1.14 @@ -156,7 +158,9 @@
1.15 if type(subvalue) == type(""):
1.16 subvalue = unicode(subvalue, encoding=self.encoding)
1.17
1.18 - subnode.setAttributeNS(EMPTY_NAMESPACE, t[2], subvalue)
1.19 + # Remove CR characters.
1.20 +
1.21 + subnode.setAttributeNS(EMPTY_NAMESPACE, t[2], subvalue.replace("\r", ""))
1.22
1.23 def complete_selectors(self, selectors, fields, documents, create):
1.24