mirror of https://gitlab.com/bashrc2/epicyon
Regenerate links within podcast descriptions
parent
786d53622b
commit
bdf1c77408
|
@ -14,6 +14,7 @@ from shutil import copyfile
|
|||
from utils import get_config_param
|
||||
from utils import remove_html
|
||||
from media import path_is_audio
|
||||
from content import add_web_links
|
||||
from webapp_utils import get_broken_link_substitute
|
||||
from webapp_utils import html_header_with_external_style
|
||||
from webapp_utils import html_footer
|
||||
|
@ -209,11 +210,15 @@ def html_podcast_episode(css_cache: {}, translate: {},
|
|||
if newswire_item[4]:
|
||||
podcast_description = \
|
||||
html.unescape(urllib.parse.unquote_plus(newswire_item[4]))
|
||||
# Why remove html? Potentially podcast descriptions could contain
|
||||
# arbitrary html with attack scripts, etc
|
||||
podcast_description = remove_html(podcast_description)
|
||||
if podcast_description:
|
||||
remove_chars = ('Œ', 'â€', 'ğŸ', '<EFBFBD>', ']]')
|
||||
for remchar in remove_chars:
|
||||
podcast_description = podcast_description.replace(remchar, '')
|
||||
# recreate any url links safely
|
||||
podcast_description = add_web_links(podcast_description)
|
||||
podcast_str += '<p>' + podcast_description + '</p>\n'
|
||||
|
||||
# donate button
|
||||
|
|
Loading…
Reference in New Issue