diff --git a/src/calibre/gui2/viewer/documentview.py b/src/calibre/gui2/viewer/documentview.py index 6b95a4dcaa..9b911754c8 100644 --- a/src/calibre/gui2/viewer/documentview.py +++ b/src/calibre/gui2/viewer/documentview.py @@ -514,7 +514,7 @@ class DocumentView(QWebView): mt = guess_type(path)[0] html = open(path, 'rb').read().decode(path.encoding, 'replace') html = EntityDeclarationProcessor(html).processed_html - has_svg = re.search(r'<[:a-z]*svg', html) is not None + has_svg = re.search(r'<[:a-zA-Z]*svg', html) is not None if 'xhtml' in mt: html = self.self_closing_pat.sub(self.self_closing_sub, html)