diff core/html.py @ 985:9b197dbba34b

Fix image_check so it doesn't choke on empty input. Issue #88.
author Brian Neal <bgneal@gmail.com>
date Sun, 25 Oct 2015 13:54:56 -0500
parents 4619290d171d
children
line wrap: on
line diff
--- a/core/html.py	Sun Oct 25 13:28:19 2015 -0500
+++ b/core/html.py	Sun Oct 25 13:54:56 2015 -0500
@@ -75,6 +75,10 @@
     hosts. If None, USER_IMAGES_SOURCES from settings will be used as the
     whitelist.
     """
+    html = html.strip()
+    if not html:
+        return True
+
     if not allowed_hosts:
         allowed_hosts = ALLOWED_HOSTS