Don't include multiple iframes within content

main
Bob Mottram 2022-10-08 15:12:03 +01:00
parent 0ed4f43f01
commit 53b2d3c773
1 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,9 @@ def _add_embedded_video_from_sites(translate: {}, content: str,
width: int, height: int) -> str: width: int, height: int) -> str:
"""Adds embedded videos """Adds embedded videos
""" """
if '<iframe' in content:
return content
if 'www.twitch.tv/' in content: if 'www.twitch.tv/' in content:
url = content.split('www.twitch.tv/')[1] url = content.split('www.twitch.tv/')[1]
if '<' in url: if '<' in url: