X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/141f3bea77fdb337069c198ffeee870696f4554e..08cbe099b8b62c2f48d2ff9865716c7d52ec22d2:/src/catalogue/models/book.py diff --git a/src/catalogue/models/book.py b/src/catalogue/models/book.py index b71926ec3..dbbee782b 100644 --- a/src/catalogue/models/book.py +++ b/src/catalogue/models/book.py @@ -754,7 +754,10 @@ class Book(models.Model): def fragment_data(self): fragment = self.choose_fragment() if fragment: - return {'title': fragment.book.pretty_title(), 'html': fragment.get_short_text()} + return { + 'title': fragment.book.pretty_title(), + 'html': re.sub(']*>', '', fragment.get_short_text()), + } else: return None