X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/967eed676fc83d15b26149047f353ac61faa8217..2ecf0995e67a4fefb003e66a2490d4895b2c0b07:/src/catalogue/utils.py diff --git a/src/catalogue/utils.py b/src/catalogue/utils.py index ec938eabb..7f337418b 100644 --- a/src/catalogue/utils.py +++ b/src/catalogue/utils.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # @@ -249,7 +248,7 @@ def truncate_html_words(s, num, end_text='...'): s = force_text(s) length = int(num) if length <= 0: - return u'' + return '' html4_singlets = ('br', 'col', 'link', 'base', 'img', 'param', 'area', 'hr', 'input') # Set up regular expressions re_words = re.compile(r'&.*?;|<.*?>|(\w[\w-]*)', re.U)