From 4aa908727144f87f3ece1974e7a0897e9b89d482 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Sun, 15 Aug 2010 10:45:34 -0400 Subject: [PATCH] Protect against blank titles causing a stack traceback --- filters/mememe.plugin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filters/mememe.plugin b/filters/mememe.plugin index 41fb803..f5b4c5b 100644 --- a/filters/mememe.plugin +++ b/filters/mememe.plugin @@ -419,7 +419,7 @@ for i in range(0,len(weighted_links)): title = re.sub('&#x(\w+);',lambda n: unichr(int(n.group(1),16)), title) # title too long? Insert zero width spaces where appropriate - if max(map(len,title.split())) > 30: + if len(title.strip())>0 and max(map(len,title.split())) > 30: title=re.sub('(\W+)',u'\\1\u200b',title) # save the entry title (it is used later)