HTMLZ Output: Fix SVG images that use xlink:href not working. Fixes #1869856 [Private bug](https://bugs.launchpad.net/calibre/+bug/1869856)

This commit is contained in:
Kovid Goyal 2020-04-02 22:37:20 +05:30
parent cb48dcb606
commit cb6abd912e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -192,6 +192,7 @@ class OEB2HTMLNoCSSizer(OEB2HTML):
# Turn the rest of the attributes into a string we can write with the tag.
at = ''
for k, v in attribs.items():
k = k.split('}')[-1]
at += ' %s="%s"' % (k, prepare_string_for_xml(v, attribute=True))
# Write the tag.
@ -284,6 +285,7 @@ class OEB2HTMLInlineCSSizer(OEB2HTML):
# Turn the rest of the attributes into a string we can write with the tag.
at = ''
for k, v in attribs.items():
k = k.split('}')[-1]
at += ' %s="%s"' % (k, prepare_string_for_xml(v, attribute=True))
# Turn style into strings for putting in the tag.
@ -376,6 +378,7 @@ class OEB2HTMLClassCSSizer(OEB2HTML):
# Turn the rest of the attributes into a string we can write with the tag.
at = ''
for k, v in attribs.items():
k = k.split('}')[-1]
at += ' %s="%s"' % (k, prepare_string_for_xml(v, attribute=True))
# Write the tag.