diff -Naur kdenetwork-3.5.8.orig/kopete/protocols/jabber/jabberchatsession.cpp kdenetwork-3.5.8/kopete/protocols/jabber/jabberchatsession.cpp --- kdenetwork-3.5.8.orig/kopete/protocols/jabber/jabberchatsession.cpp 2006-10-01 19:26:47.000000000 +0200 +++ kdenetwork-3.5.8/kopete/protocols/jabber/jabberchatsession.cpp 2007-11-21 08:43:03.000000000 +0100 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -295,8 +296,12 @@ //  is not a valid XML entity xhtmlBody.replace(" " , " "); - - xhtmlBody="

"+ xhtmlBody +"

"; + + // Remove trailing line break + xhtmlBody.remove( QRegExp( "
$" ) ); + + xhtmlBody = "" + xhtmlBody + ""; + jabberMessage.setXHTMLBody ( xhtmlBody ); } }