Merge pull request #21655 from edx/awais786/BOM-477

BOM-477
This commit is contained in:
Awais Qureshi
2019-09-14 02:01:35 +05:00
committed by GitHub

View File

@@ -193,7 +193,7 @@ def get_inner_html_from_xpath(xpath_node):
"""
# returns string from xpath node
html = etree.tostring(xpath_node).strip()
html = etree.tostring(xpath_node).strip().decode('utf-8')
# strips outer tag from html string
# xss-lint: disable=python-interpolate-html
inner_html = re.sub('(?ms)<%s[^>]*>(.*)</%s>' % (xpath_node.tag, xpath_node.tag), '\\1', html)