Remove <body>...</body> tags from XHTML messages

This commit is contained in:
Jan Kaluza 2011-08-09 13:59:35 +02:00
parent 207f915f00
commit a1cf70cd89

View file

@ -738,6 +738,14 @@ static void conv_write_im(PurpleConversation *conv, const char *who, const char
g_free(xhtml_linkified);
g_free(strip);
// AIM and XMPP adds <body>...</body> here...
if (xhtml_.find("<body>") == 0) {
xhtml_ = xhtml_.substr(6);
if (xhtml_.find("</body>") != std::string::npos) {
xhtml_ = xhtml_.substr(0, xhtml_.find("</body>"));
}
}
if (xhtml_ == message_) {
xhtml_ = "";
}