Bug 60700 - wrong html-tag formatting when sending messages
Summary: wrong html-tag formatting when sending messages
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: Jabber Plugin (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-03 17:23 UTC by mario
Modified: 2003-07-08 20:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mario 2003-07-03 17:23:30 UTC
Version:           0.6.90cvs >= 20030620 (using KDE 3.1.2)
Installed from:     (testing/unstable)
Compiler:          gcc version 3.3 (Debian)
OS:          Linux (i686) release 2.4.20

When sending messages with linebreaks, I get bad tags in it.
E.g. sending a message with jabber-transport, I type:
-- start message --
asdf
asdf
-- end message --

And get a console output like:

-- start output
kopete: [JabberAccount] Psi: Client: outgoing: [
<message type="chat" to="XXX@XXX.jabber.XX" >
<body>asdf&lt;br/>asdf</body>
</message>
]
-- end output --

PSI and ICQ Users (when send with jit-transport) on the other side get an output like:
"asdf<br/>asdf"

This happens on every multiline message I send from my jabber account.
icq-Plugin <-> licq seems to work fine.
Comment 1 Matt Rogers 2003-07-07 18:16:11 UTC
Are you sending messages using the jabber plugin or the ICQ plugin? I don't understand, 
since it appears that parts of your bug report are missing. Please provide some more 
information or this bug report will more than likely be closed. 
Comment 2 mario 2003-07-07 18:24:19 UTC
Yes, there are parts missing...(and I don't know why) console output is: 
 
kopete: [JabberAccount] Psi: Client: outgoing: [ 
<message type="chat" to="95723948@jit.jabber.fsinf.de" > 
<body>test&lt;br/>test</body> 
</message> 
] 
 
It seems to be a jabber-issue, as I currently can't reproduce it using other 
protocol plugins like ICQ or AIM. 
 
Hope that helps a bit. 
Comment 3 Till Gerken 2003-07-07 18:46:31 UTC
I can confirm this, I'll be working on it. 
Comment 4 Till Gerken 2003-07-08 20:23:12 UTC
Subject: kdenonbeta/kopete/protocols/jabber

CVS commit by gerken: 

Messages are now explicitely sent as plain text. Incoming messages are
treated as plain text as well. RichText/XHTML support is on the TODO list.

CCMAIL: 60700-done@bugs.kde.org


  M +1 -1      TODO   1.36
  M +1 -1      jabberaccount.cpp   1.36
  M +4 -3      jabbercontact.cpp   1.133


--- kdenonbeta/kopete/protocols/jabber/TODO  #1.35:1.36
@@ -24,5 +24,5 @@
 - should the away dialog pop up when going away using the account context menu?
 - add canSendOffline() to JabberProtocol
-- messages contain HTML-like tags (bug 60700)
 - verify FIXMEs in JabberContact
 - save "auto connect" in account preferences
+- support XHTML message types

--- kdenonbeta/kopete/protocols/jabber/jabberaccount.cpp  #1.35:1.36
@@ -825,5 +825,5 @@ void JabberAccount::slotSubscription (co
 
                         /* If it is not, ask the user if he wants to subscribe in return. */
-                        if (!mc && (KMessageBox::questionYesNo (qApp->mainWidget (),
+                        if ((!mc || mc->isTemporary()) && (KMessageBox::questionYesNo (qApp->mainWidget (),
                                                                                                         i18n
                                                                                                         ("Do you want to add %1 to your contact "

--- kdenonbeta/kopete/protocols/jabber/jabbercontact.cpp  #1.132:1.133
@@ -353,5 +353,5 @@ void JabberContact::km2jm (const KopeteM
 
         //jabMessage.setFrom(from->userId();
-        jabMessage.setBody (km.parsedBody (), true);
+        jabMessage.setBody (km.plainBody (), true);
         jabMessage.setSubject (km.subject ());
 
@@ -382,6 +383,6 @@ void JabberContact::slotReceivedMessage 
 
         // convert Jabber::Message into KopeteMessage
-        KopeteMessage newMessage (message.timeStamp (),
-                                                          this, contactList, message.body (), message.subject (), KopeteMessage::Inbound, KopeteMessage::PlainText, type);
+        KopeteMessage newMessage (message.timeStamp (), this, contactList, message.body (), message.subject (),
+                                                          KopeteMessage::Inbound, KopeteMessage::PlainText, type);
 
         // add it to the manager