aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/util.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-06-21 08:20:05 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-06-21 08:20:05 -0500
commit4fd18da0a8585e454cf68f16487ef5abc213d78a (patch)
tree88eb26880de58516b3c30ad72e3b47fcc8dbf065 /mediagoblin/util.py
parenta2c37d0a78f939ee208225840f83a90fd698aedf (diff)
downloadmediagoblin-4fd18da0a8585e454cf68f16487ef5abc213d78a.tar.lz
mediagoblin-4fd18da0a8585e454cf68f16487ef5abc213d78a.tar.xz
mediagoblin-4fd18da0a8585e454cf68f16487ef5abc213d78a.zip
Also fix clean_html so that it doesn't barf on an empty string.
Diffstat (limited to 'mediagoblin/util.py')
-rw-r--r--mediagoblin/util.py4
1 files changed, 4 insertions, 0 deletions
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)