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
803db4ee
Commit
803db4ee
authored
Dec 12, 2017
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix safe_lxml. SEC-338
parent
1c027c43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
common/lib/safe_lxml/safe_lxml/etree.py
+8
-3
No files found.
common/lib/safe_lxml/safe_lxml/etree.py
View file @
803db4ee
...
@@ -7,12 +7,17 @@ It also includes a safer XMLParser.
...
@@ -7,12 +7,17 @@ It also includes a safer XMLParser.
For processing xml always prefer this over using lxml.etree directly.
For processing xml always prefer this over using lxml.etree directly.
"""
"""
# This should be imported after lxml.etree so that it overrides the following attributes.
# Names are imported into this module so that it can be a stand-in for
from
defusedxml.lxml
import
XML
,
fromstring
,
parse
# lxml.etree. The names are not used here, so disable the pylint warning.
# pylint: disable=unused-import, wildcard-import, unused-wildcard-import
from
lxml.etree
import
XMLParser
as
_XMLParser
from
lxml.etree
import
XMLParser
as
_XMLParser
from
lxml.etree
import
*
# pylint: disable=wildcard-import, unused-wildcard-import; pylint: disable=unused-import
from
lxml.etree
import
*
from
lxml.etree
import
_Element
,
_ElementTree
from
lxml.etree
import
_Element
,
_ElementTree
# This should be imported after lxml.etree so that it overrides the following attributes.
from
defusedxml.lxml
import
XML
,
fromstring
,
parse
class
XMLParser
(
_XMLParser
):
# pylint: disable=function-redefined
class
XMLParser
(
_XMLParser
):
# pylint: disable=function-redefined
"""
"""
...
...
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