diff --git a/src/css_reader.py b/src/css_reader.py index e31d562..911594e 100644 --- a/src/css_reader.py +++ b/src/css_reader.py @@ -297,6 +297,7 @@ def add_inline_style_to_html_soup(soup1, css_text): html_with_inline_style = transform(str(soup1), css_text=css_text, remove_classes=False, external_styles=False, + allow_network=False, disable_validation=True) soup2 = BeautifulSoup(html_with_inline_style, features='lxml') diff --git a/src/epub_postprocessor.py b/src/epub_postprocessor.py index e550032..42e5f8d 100644 --- a/src/epub_postprocessor.py +++ b/src/epub_postprocessor.py @@ -188,6 +188,7 @@ class EpubPostprocessor: for i, file in enumerate(not_added): node = NavPoint(Section(f'To check #{i}, filename: {file}', file)) self.adjacency_list[-1].append(node) + self.added_to_toc_hrefs.add(file) def unwrap_all_html_soup(self): # mark