Remove <button> from all recipe downloads

This commit is contained in:
Kovid Goyal 2024-02-15 13:09:32 +05:30
parent 25adcae5b5
commit 773f7676b5
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1032,7 +1032,7 @@ class BasicNewsRecipe(Recipe):
for attr in self.remove_attributes:
for x in soup.findAll(attrs={attr:True}):
del x[attr]
for bad_tag in list(soup.findAll(['base', 'iframe', 'canvas', 'embed',
for bad_tag in list(soup.findAll(['base', 'iframe', 'canvas', 'embed', 'button',
'command', 'datalist', 'video', 'audio', 'noscript', 'link', 'meta'])):
# link tags can be used for preloading causing network activity in
# calibre viewer. meta tags can do all sorts of crazy things,