Problem with urbandict plugin fixed by replacing \r\n with a space

This commit is contained in:
Lasse Vang Gravesen 2012-07-18 18:39:51 +02:00
parent 68e5535ca4
commit 12cd3521e5
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ def urban(inp):
if page['result_type'] == 'no_results':
return 'not found.'
out = defs[0]['word'] + ': ' + defs[0]['definition']
out = defs[0]['word'] + ': ' + defs[0]['definition'].replace('\r\n',' ')
if len(out) > 400:
out = out[:out.rfind(' ', 0, 400)] + '...'