XMLUtil encoding problem

5 posts / 0 new
Last post
Anonymous
XMLUtil encoding problem

Hi,

We have in our database something like this


When this contact is sent to the client, the name attribute is encoded to


and it makes the client display the name as ""abc"" I traced the code and look like it encode the "&" to "&" and leaves the "quot;" alone.

Application: 

I think Tigase behaves correctly, it delivers to the client exactly what is in database and I it seems to me this is the right thing to do.
The question is, why such thing is in database. This is something wrong with either Tigase saving data to database or something bad happening during contact processing.
What version of the Tigase server do you use?

Anonymous

We have the latest 5.1.0b4 installed. The problem happens when adding contacts in XMPP clients (PSI+ or iJab) that have the double quote (") in the optional nickname. So if users enter "abc" for the nickname, it will show up in the window as "abc" As I said, the client will send "abc" to the server, and the server save it as is in database. And when requested by the client, it sends back "abc" and the client will decode it to "abc"

Hm, I would need to investigate it. I wonder which part, where exactly quote is changed to &quote;. Whether it is done by the client or by the server somewhere before saving to the database.
I am afraid I do not have a solution for this right now. I have added a ticket for this: https://projects.tigase.org/issues/431

Anonymous

Here is the firebug trace

From client, right after clicking on Add button

and eventually response by server