Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
a81757ac
Commit
a81757ac
authored
Aug 17, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweaks to cleanup script
don't strip cdata, don't mess with names
parent
5f473f76
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
common/xml_cleanup.py
+2
-2
No files found.
common/xml_cleanup.py
View file @
a81757ac
...
...
@@ -49,7 +49,7 @@ def cleanup(filepath, remove_meta):
try
:
print
"Cleaning {0}"
.
format
(
filepath
)
with
open
(
filepath
)
as
f
:
parser
=
etree
.
XMLParser
(
remove_comments
=
False
)
parser
=
etree
.
XMLParser
(
remove_comments
=
False
,
strip_cdata
=
False
)
xml
=
etree
.
parse
(
filepath
,
parser
=
parser
)
except
:
print
"Error parsing file {0}"
.
format
(
filepath
)
...
...
@@ -59,7 +59,7 @@ def cleanup(filepath, remove_meta):
attrs
=
node
.
attrib
if
'url_name'
in
attrs
:
used_names
[
node
.
tag
]
.
add
(
attrs
[
'url_name'
])
if
'name'
in
attrs
:
if
False
and
'name'
in
attrs
:
# Replace name with an identical display_name, and a unique url_name
name
=
attrs
[
'name'
]
attrs
[
'display_name'
]
=
name
...
...
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