Also fix clean_html so that it doesn't barf on an empty string.
authorChristopher Allan Webber <cwebber@dustycloud.org>
Tue, 21 Jun 2011 13:20:05 +0000 (08:20 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Tue, 21 Jun 2011 13:20:05 +0000 (08:20 -0500)
mediagoblin/util.py

index e964324fd1215e7ac7e548a29995b594c1ed0ed6..91fbee0a10a60d4ddd7d98465c46de3f34abac13 100644 (file)
@@ -373,6 +373,10 @@ HTML_CLEANER = Cleaner(
 
 
 def clean_html(html):
+    # clean_html barfs on an empty string
+    if not html:
+        return u''
+
     return HTML_CLEANER.clean_html(html)