[sip-comm-dev] History search - problems with multiline messages


#1

Hello Devs,

Recently I had to search my message history and noticed strange behavior with multiline messages. I then tried to reproduce it and came up with the following case:

I initiate a chat with someone and type the following on two lines, just as it shows here (by using <Ctrl> + <Enter> to insert a newline):

···

-------------
test1
test2
-------------
and send it.

Then I type a single line:
-------------
test3
-------------
and send it.

After that, I open the history and want to search for the string "test1", but it gives me no result. The same for "test2". Now I try "test3" and voila - the string is found. Then I try the sub-string "test" and I get all 3 of them. All these without the quotes, of course.

Here is the part of the log file that keeps the history:

-----------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<history>
...
...
...
  <record timestamp="1172667441884">
    <dir>out</dir>
    <msg><![CDATA[test1
test2]]></msg>
    <msgTyp>text/plain</msgTyp>
    <enc>UTF-8</enc>
    <uid>11726674418832754428</uid>
    <receivedTimestamp>1172667441884</receivedTimestamp>
  </record>
  <record timestamp="1172667443547">
    <dir>out</dir>
    <msg><![CDATA[test3]]></msg>
    <msgTyp>text/plain</msgTyp>
    <enc>UTF-8</enc>
    <uid>117266744354733004951</uid>
    <receivedTimestamp>1172667443547</receivedTimestamp>
  </record>
</history>
-----------------------------------------

Note that it reproduces both for ICQ and YM, probably because the format of the history file is the same.

Thanks,
--Pavel Tankov

____________________________________________________________________________________
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/


#2

Hi,

I've located the problem - its some regular expression issue. Will be fixed.
Thanks.

damencho

Pavel Tankov wrote:

···

Hello Devs,

Recently I had to search my message history and noticed strange behavior with multiline messages. I then tried to reproduce it and came up with the following case:

I initiate a chat with someone and type the following on two lines, just as it shows here (by using <Ctrl> + <Enter> to insert a newline):
-------------
test1
test2
-------------
and send it.

Then I type a single line:
-------------
test3
-------------
and send it.

After that, I open the history and want to search for the string "test1", but it gives me no result. The same for "test2". Now I try "test3" and voila - the string is found. Then I try the sub-string "test" and I get all 3 of them. All these without the quotes, of course.

Here is the part of the log file that keeps the history:

-----------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<history>
...
  <record timestamp="1172667441884">
    <dir>out</dir>
    <msg><![CDATA[test1
test2]]></msg>
    <msgTyp>text/plain</msgTyp>
    <enc>UTF-8</enc>
    <uid>11726674418832754428</uid>
    <receivedTimestamp>1172667441884</receivedTimestamp>
  </record>
  <record timestamp="1172667443547">
    <dir>out</dir>
    <msg><![CDATA[test3]]></msg>
    <msgTyp>text/plain</msgTyp>
    <enc>UTF-8</enc>
    <uid>117266744354733004951</uid>
    <receivedTimestamp>1172667443547</receivedTimestamp>
  </record>
</history>
-----------------------------------------

Note that it reproduces both for ICQ and YM, probably because the format of the history file is the same.

Thanks,
--Pavel Tankov

------------------------------------------------------------------------
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel <http://travel.yahoo.com/hotelsearchpage;_ylc=X3oDMTFtaTIzNXVjBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzIEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--> to find your fit.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net