From: Christopher Allan Webber Date: Tue, 21 Jun 2011 13:20:05 +0000 (-0500) Subject: Also fix clean_html so that it doesn't barf on an empty string. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4fd18da0a8585e454cf68f16487ef5abc213d78a;p=mediagoblin.git Also fix clean_html so that it doesn't barf on an empty string. --- 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)