Permalink
Browse files

Protect against blank titles causing a stack traceback

  • Loading branch information...
1 parent 206b21e commit 4aa908727144f87f3ece1974e7a0897e9b89d482 @rubys committed Aug 15, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 filters/mememe.plugin
View
@@ -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)

0 comments on commit 4aa9087

Please sign in to comment.