Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Matevz Golob
erp5
Commits
dd8f86d0
Commit
dd8f86d0
authored
Jul 04, 2013
by
Aurel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
if we do not get syncml, it must be CDATA type
parent
91c808a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
product/ERP5SyncML/SyncMLMessage.py
product/ERP5SyncML/SyncMLMessage.py
+8
-3
No files found.
product/ERP5SyncML/SyncMLMessage.py
View file @
dd8f86d0
...
...
@@ -579,9 +579,14 @@ class SyncMLRequest(object):
sync_command_kw
[
"xml_data"
]
=
etree
.
tostring
(
xml_data
[
0
])
else
:
# If not xml, return raw data
# XXX This must be CDATA type
data
=
sync_command
.
xpath
(
'string(.//syncml:Item/syncml:Data)'
,
namespaces
=
self
.
data
.
nsmap
)
if
isinstance
(
data
,
etree
.
CDATA
):
parser
=
etree
.
XMLParser
(
strip_cdata
=
False
)
cdata
=
etree
.
XML
(
data
,
parser
)
data
=
cdata
.
text
# XXX this is unicode and can be a problem for activity
sync_command_kw
[
"raw_data"
]
=
sync_command
.
xpath
(
'string(.//syncml:Item/syncml:Data)'
,
namespaces
=
self
.
data
.
nsmap
)
sync_command_kw
[
"raw_data"
]
=
data
append
(
sync_command_kw
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment