------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=126784
ogoffart kde org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From ogoffart kde org 2006-06-07 20:09 -------
SVN commit 549197 by ogoffart:
Fix Bug 126784: kopete trims incoming/outgoing text on display
BUG: 126784
M +10 -3 libkopete/kopetemessage.cpp
M +3 -0 protocols/jabber/jabberchatsession.cpp
--- branches/kopete/0.12/kopete/libkopete/kopetemessage.cpp #549196:549197
@ -2,7 +2,7 @
kopetemessage.cpp - Base class for Kopete messages
Copyright (c) 2002-2003 by Martijn Klingens <klingens kde org>
- Copyright (c) 2002-2005 by Olivier Goffart <ogoffart @ kde.org>
+ Copyright (c) 2002-2006 by Olivier Goffart <ogoffart @ kde.org>
Kopete (c) 2002-2005 by the Kopete developers <kopete-devel kde org>
@ -77,6 +77,8 @
, requestedPlugin(requestedPlugin), importance( (to.count() <= 1) ?
Normal : Low ), bgOverride(false), fgOverride(false)
, rtfOverride(false), timeStamp(timeStamp), body(body), subject(subject)
{
+
+ //TODO: move that in ChatTextEditPart::contents
if( format == RichText )
{
//This is coming from the RichTextEditor component.
@ -93,6 +95,8 @
if ( this->body.endsWith( QString::fromLatin1("<br/>") ) )
this->body.truncate( this->body.length() - 5 );
this->body.remove( QString::fromLatin1("\n") );
+ this->body.replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ),
QString::fromLatin1( " " ) );
+
}
}
@ -205,6 +209,7 @
detach();
QString theBody = body;
+ //TODO: move that in ChatTextEditPart::contents
if( f == RichText )
{
//This is coming from the RichTextEditor component.
@ -220,12 +225,13 @
//Remove trailing </br>
if ( theBody.endsWith( QString::fromLatin1("<br/>") ) )
theBody.truncate( theBody.length() - 5 );
-
+
theBody.remove( QString::fromLatin1("\n") );
+ theBody.replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ),
QString::fromLatin1( " " ) );
}
/* else if( f == ParsedHTML )
{
- kdWarning( 14000 ) << k_funcinfo << "using ParsedHTML which is
internal ! message: " << body << kdBacktrace() << endl;
+ kdWarning( 14000 ) << k_funcinfo << "using ParsedHTML which is internal
! message: " << body << kdBacktrace() << endl;
}*/
d->body=theBody;
@ -256,6 +262,7 @
data.replace( QString::fromLatin1( """ ), QString::fromLatin1(
"\"" ) );
data.replace( QString::fromLatin1( " " ), QString::fromLatin1( " "
) );
data.replace( QString::fromLatin1( "&" ), QString::fromLatin1( "&"
) );
+ data.replace( QString::fromLatin1( " " ), QString::fromLatin1( " "
) ); //this one is used in jabber: note, we should escape all &#xx;
return data;
}
--- branches/kopete/0.12/kopete/protocols/jabber/jabberchatsession.cpp
#549196:549197
@ -297,6 +297,9 @
// Anyway, theses client that do like
that are *WRONG* considreded the example of jep-71 where there are lot of
// linebreak that are not interpreted.
- Olivier 2006-31-03
xhtmlBody.replace("\n","");
+
+ // is not a valid XML entity
+ xhtmlBody.replace(" " , " ");
xhtmlBody="<p "+
message.getHtmlStyleAttribute() +">"+ xhtmlBody +"</p>";
jabberMessage.setXHTMLBody ( xhtmlBody
);
_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel