mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
News download: Automatically remove <base> tags in the postptocess phase as they cause links in generated EPUB files to not work
This commit is contained in:
parent
bf8324b622
commit
97ba8f07a4
@ -910,7 +910,6 @@ class OnDeviceSearch(SearchQueryParser):
|
|||||||
except ValueError: # Unicode errors
|
except ValueError: # Unicode errors
|
||||||
import traceback
|
import traceback
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
pass
|
|
||||||
return matches
|
return matches
|
||||||
|
|
||||||
|
|
||||||
|
@ -619,6 +619,8 @@ class BasicNewsRecipe(Recipe):
|
|||||||
for attr in self.remove_attributes:
|
for attr in self.remove_attributes:
|
||||||
for x in soup.findAll(attrs={attr:True}):
|
for x in soup.findAll(attrs={attr:True}):
|
||||||
del x[attr]
|
del x[attr]
|
||||||
|
for base in list(soup.findAll('base')):
|
||||||
|
base.extract()
|
||||||
return self.postprocess_html(soup, first_fetch)
|
return self.postprocess_html(soup, first_fetch)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user