mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Skip sanitizing in comments editor when special <meta> tag detected.
This commit is contained in:
parent
5f07a78b0a
commit
264450ac5a
@ -343,6 +343,10 @@ class EditorWidget(QWebView): # {{{
|
||||
if not check and '<img' not in raw.lower():
|
||||
return ans
|
||||
|
||||
# Bypass cleanup if special meta tag exists
|
||||
if '<meta name="calibre-dont-sanitize">' in raw.lower():
|
||||
return unicode(self.page().mainFrame().toHtml())
|
||||
|
||||
try:
|
||||
root = html.fromstring(raw)
|
||||
except:
|
||||
|
Loading…
x
Reference in New Issue
Block a user