String: Strip all newline characters in base64 output.

This commit is contained in:
Valentin Lorentz 2015-02-11 14:08:25 +00:00
parent 7bba16a55e
commit bcd39743f0

View File

@ -101,6 +101,9 @@ class String(callbacks.Plugin):
elif sys.version_info[0] >= 3 and isinstance(text, bytes): elif sys.version_info[0] >= 3 and isinstance(text, bytes):
text = text.decode() text = text.decode()
if encoding in ('base64', 'base64_codec'):
text = text.replace('\n', '')
# Reply # Reply
irc.reply(text.rstrip('\n')) irc.reply(text.rstrip('\n'))
encode = wrap(encode, ['something', 'text']) encode = wrap(encode, ['something', 'text'])