[jitsi-dev] MUC issue (others messages are xml in muc)


#1

Hi!

Jitsi seems awesome but MUC doesn't seem to parse messages correctly.

I use google talk account and I joined muc on some jabber server. When others send messages to chat, jitsi shows some of message's xml content within chat.

Currently chat looks like this:
me: hi
otherparticipant: <cite id='null-editedAt'> </cite></a></h2></td><td align="right"><h2>Mar 07, 2013 09:47:36</h2></td></tr></table><div id='messagenull' name = 'otherparticipant' date="1362642456475" original_message = 'hi' style=""><PLAINTEXT>hi
me: weird
otherparticipant: <cite id='null-editedAt'> </cite></a></h2></td><td align="right"><h2>Mar 07, 2013 09:47:42</h2></td></tr></table><div id='messagenull' name = 'otherparticipant' date="1362642462505" original_message = 'what' style=""><PLAINTEXT>what

Jitsi version used was 2.0.4506.10553 on linux amd64.


#2

Problem might be in ChatConversationPanel#processKey(String message, String contentType, String keyword).

Checked with debugger quickly that it receives these parameters=

message = "<table width="100%" name="table" style="background-color:#efefef;"><tr><td align="left" ><h2 id="messageHeader" date='1362646985946'><a style="color:#488fe7;font-weight:bold;text-decoration:none;" href="Mauno Haukila">Mauno Haukila<cite id='null-editedAt'> </cite></a></h2></td><td align="right"><h2>Mar 07, 2013 11:03:05</h2></td></tr></table><div id='messagenull' name = 'Mauno Haukila' date="1362646985946" original_message = 'test' style=""><PLAINTEXT>test</PLAINTEXT></div>"

keyword = "mauno"

content/type ="text/plain"

So the regexp will match 3 times ([pattern=\Qmauno\E region=0,478 lastmatch=Mauno]) and that msgBuffer will contain after those appends (after the loop) =
"<table width="100%" name="table" style="background-color:#efefef;"><tr><td align="left" ><h2 id="messageHeader" date='1362646985946'><a style="color:#488fe7;font-weight:bold;text-decoration:none;" href="</PLAINTEXT><b>Mauno</b><PLAINTEXT> Haukila"></PLAINTEXT><b>Mauno</b><PLAINTEXT> Haukila<cite id='null-editedAt'> </cite></a></h2></td><td align="right"><h2>Mar 07, 2013 11:03:05</h2></td></tr></table><div id='messagenull' name = '</PLAINTEXT><b>Mauno</b><PLAINTEXT>"

Methods returns =
"<table width="100%" name="table" style="background-color:#efefef;"><tr><td align="left" ><h2 id="messageHeader" date='1362646985946'><a style="color:#488fe7;font-weight:bold;text-decoration:none;" href="</PLAINTEXT><b>Mauno</b><PLAINTEXT> Haukila"></PLAINTEXT><b>Mauno</b><PLAINTEXT> Haukila<cite id='null-editedAt'> </cite></a></h2></td><td align="right"><h2>Mar 07, 2013 11:03:05</h2></td></tr></table><div id='messagenull' name = '</PLAINTEXT><b>Mauno</b><PLAINTEXT> Haukila' date="1362646985946" original_message = 'test' style=""><PLAINTEXT>test</PLAINTEXT></div>"

ยทยทยท

On 07.03.2013 09:53, Mauno Haukila wrote:

Hi!

Jitsi seems awesome but MUC doesn't seem to parse messages correctly.

I use google talk account and I joined muc on some jabber server. When others send messages to chat, jitsi shows some of message's xml content within chat.

Currently chat looks like this:
me: hi
otherparticipant: <cite id='null-editedAt'> </cite></a></h2></td><td align="right"><h2>Mar 07, 2013 09:47:36</h2></td></tr></table><div id='messagenull' name = 'otherparticipant' date="1362642456475" original_message = 'hi' style=""><PLAINTEXT>hi
me: weird
otherparticipant: <cite id='null-editedAt'> </cite></a></h2></td><td align="right"><h2>Mar 07, 2013 09:47:42</h2></td></tr></table><div id='messagenull' name = 'otherparticipant' date="1362642462505" original_message = 'what' style=""><PLAINTEXT>what

Jitsi version used was 2.0.4506.10553 on linux amd64.