Remove IRC colors from the body when forwarding it to XMPP
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <bridge/colors.hpp>
|
||||
#include <utils/encoding.hpp>
|
||||
#include <string.h>
|
||||
|
||||
@@ -39,5 +40,9 @@ int main()
|
||||
// wrong charset)
|
||||
std::string from_ascii = utils::convert_to_utf8(original_latin1, "US-ASCII");
|
||||
assert(from_ascii == "couc�ou");
|
||||
|
||||
std::string coucou("\u0002\u0002COUCOU\u0003");
|
||||
remove_irc_colors(coucou);
|
||||
assert(coucou == "COUCOU");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user