Bug 155216 - Rich text editor now returns <p> elements which are not handled by AIM's parser
Summary: Rich text editor now returns <p> elements which are not handled by AIM's parser
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Unmaintained
Component: libkopete (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
: 156529 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-07 09:25 UTC by Benson Tsai
Modified: 2008-01-24 22:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
one liner patch to fix it (817 bytes, patch)
2008-01-08 02:41 UTC, Charles Connell
Details

Note You need to log in before you can comment on or make changes to this bug.
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. ***