mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1579507 [NY Time recipe fails to download](https://bugs.launchpad.net/calibre/+bug/1579507)
This commit is contained in:
parent
787e2abb25
commit
d1be20bae3
@ -352,7 +352,7 @@ def escape_cdata(root):
|
||||
pat = re.compile(r'[<>&]')
|
||||
for elem in root.iterdescendants('{%s}style' % XHTML_NS, '{%s}script' % XHTML_NS):
|
||||
if elem.text and pat.search(elem.text) is not None:
|
||||
elem.text = etree.CDATA(elem.text)
|
||||
elem.text = etree.CDATA(elem.text.replace(']]>', r'\]\]\>'))
|
||||
|
||||
def serialize(data, media_type, pretty_print=False):
|
||||
if isinstance(data, etree._Element):
|
||||
|
Loading…
x
Reference in New Issue
Block a user