XMLUtil encoding problem
Hi,
We have in our database something like this
<contact ... name=""abc"" ...>When this contact is sent to the client, the name attribute is encoded to
<contact ... name="&quot;abc&quot;" ...>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.
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?
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 "e;. 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
Here is the firebug trace
From client, right after clicking on Add button
<iq type='set' id='prJP'><query xmlns='jabber:iq:roster'><item jid='abc@abc.com' name='"abc"'><group></group></item></query></iq>and eventually response by server
<iq to="abc@abc.net/abc..ie65fc.E29F2" xmlns="jabber:client" type="set" id="rsttig3"><query xmlns="jabber:iq:roster"><item ask="subscribe" name="&quot;abc&quot;" jid="abc@abc.com" subscription="none"><group/></item></query></iq><iq to="abc@abc.net/abc..ie65fc.E29F2" xmlns="jabber:client" type="set" id="rsttig4"><query xmlns="jabber:iq:roster"><item ask="subscribe" name="&quot;abc&quot;" jid="abc@abc.com" subscription="none"><group/></item></query></iq>




Recent comments
1 day 13 hours ago
3 days 16 hours ago
3 days 17 hours ago
4 days 1 hour ago
4 days 11 hours ago
4 days 13 hours ago
4 days 13 hours ago
5 days 12 hours ago
5 days 15 hours ago
5 days 15 hours ago