From 4fd18da0a8585e454cf68f16487ef5abc213d78a Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Tue, 21 Jun 2011 08:20:05 -0500 Subject: [PATCH] Also fix clean_html so that it doesn't barf on an empty string. --- mediagoblin/util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mediagoblin/util.py b/mediagoblin/util.py index e964324f..91fbee0a 100644 --- a/mediagoblin/util.py +++ b/mediagoblin/util.py @@ -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) -- 2.25.1