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
6bca6cdc
Commit
6bca6cdc
authored
Aug 16, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #430 from MITx/feature/ichuang/fix-modulestore-etree-parser
Fix bug preventing comments from being in course.xml
parents
919b3e21
7553dac2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
common/lib/xmodule/xmodule/modulestore/xml.py
+6
-4
No files found.
common/lib/xmodule/xmodule/modulestore/xml.py
View file @
6bca6cdc
...
...
@@ -6,6 +6,7 @@ import re
from
fs.osfs
import
OSFS
from
importlib
import
import_module
from
lxml
import
etree
from
lxml.html
import
HtmlComment
from
path
import
path
from
xmodule.errortracker
import
ErrorLog
,
make_error_tracker
from
xmodule.x_module
import
XModuleDescriptor
,
XMLParsingSystem
...
...
@@ -16,9 +17,10 @@ from cStringIO import StringIO
from
.
import
ModuleStoreBase
,
Location
from
.exceptions
import
ItemNotFoundError
etree
.
set_default_parser
(
etree
.
XMLParser
(
dtd_validation
=
False
,
load_dtd
=
False
,
remove_comments
=
True
,
remove_blank_text
=
True
))
edx_xml_parser
=
etree
.
XMLParser
(
dtd_validation
=
False
,
load_dtd
=
False
,
remove_comments
=
True
,
remove_blank_text
=
True
)
etree
.
set_default_parser
(
edx_xml_parser
)
log
=
logging
.
getLogger
(
'mitx.'
+
__name__
)
...
...
@@ -211,7 +213,7 @@ class XMLModuleStore(ModuleStoreBase):
# been imported into the cms from xml
course_file
=
StringIO
(
clean_out_mako_templating
(
course_file
.
read
()))
course_data
=
etree
.
parse
(
course_file
)
.
getroot
()
course_data
=
etree
.
parse
(
course_file
,
parser
=
edx_xml_parser
)
.
getroot
()
org
=
course_data
.
get
(
'org'
)
...
...
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