handle potential newlines in output

This commit is contained in:
Brian S. Stephan 2010-12-11 00:10:26 -06:00
parent 977675c593
commit e084c28113
1 changed files with 2 additions and 2 deletions

View File

@ -57,10 +57,10 @@ class TextTransform(Module):
whats = what.split(' ')
if whats[0] == 'base64e' or whats[0] == 'base64':
reply[0] = base64.encodestring(' '.join(whats[1:]))
reply[0] = base64.encodestring(' '.join(whats[1:])).replace('\n','')
return True
if whats[0] == 'base64d':
reply[0] = base64.decodestring(' '.join(whats[1:]))
reply[0] = base64.decodestring(' '.join(whats[1:])).replace('\n','')
return True
# vi:tabstop=4:expandtab:autoindent