Bug 155216

Summary: Rich text editor now returns <p> elements which are not handled by AIM's parser
Product: [Applications] kopete Reporter: Benson Tsai <btsai>
Component: libkopeteAssignee: Kopete Developers <kopete-bugs-null>
Severity: normal CC: jay
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: one liner patch to fix it

Description Benson Tsai 2008-01-07 09:25:28 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

Rich text editor now returns <p> elements which are not handled by AIM's parser. For example, when I send the message contaning "mm", the resulting text is actually:

"<p style=" margin-top:0px; margi-bottom:0px;margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">mm</p>"

I believe the old behavior yielded <span> instead of <p>.

Now the code for AIM to translate the rich text into something that AIM clients can handle only replaces <span style=""> and not <p style="">
Comment 1 Charles Connell 2008-01-08 00:32:13 UTC
Confirmed. I actually introduced the <p> behavior. How silly of me to assume that a peer client might not understand basic HTML. :)
Comment 2 Charles Connell 2008-01-08 02:41:00 UTC
Created attachment 22897 [details]
one liner patch to fix it

Please apply this patch and tell me if it fixes the problem on the AIM-client
side, and if it introduces any problems on the Kopete side. I didn't test it at
all, but it should be okay.
Comment 3 Benson Tsai 2008-01-08 04:47:39 UTC
That worked. Although, shouldn't <p>content</p> be translated to something along the lines of content<br />?
Comment 4 Charles Connell 2008-01-09 02:12:24 UTC
That's not needed, since real newlines in the text editor are reported as <br>.
Comment 5 Charles Connell 2008-01-09 02:43:43 UTC
Committed fix. http://websvn.kde.org/?view=rev&revision=758764. Would have closed in commit message but git is confusing me.
Comment 6 Charles Connell 2008-01-24 22:17:00 UTC
*** Bug 156529 has been marked as a duplicate of this bug. ***