From 27f797c8af6da618c3a2d71a97bfd7f781176b7b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 24 Dec 2020 13:57:02 +0000 Subject: [PATCH] More checks --- webapp_media.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/webapp_media.py b/webapp_media.py index 060b9d225..0156b65da 100644 --- a/webapp_media.py +++ b/webapp_media.py @@ -138,6 +138,13 @@ def _addEmbeddedVideoFromSites(translate: {}, content: str, 'exode.me', 'peertube.video') for site in peerTubeSites: + site = site.strip() + if not site: + continue + if len(site) < 5: + continue + if '.' not in site: + continue siteStr = site if site.startswith('http://'): site = site.replace('http://', '')