Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tigase special characters #20

Open
Ucheha opened this issue Feb 19, 2020 · 1 comment
Open

Tigase special characters #20

Ucheha opened this issue Feb 19, 2020 · 1 comment

Comments

@Ucheha
Copy link

Ucheha commented Feb 19, 2020

Tigase is not escaping special characters when sending stanza to the clients.
special characters like [ @ %^&) > ] ..

sending special characters from client A to client B
tigase shows that message sent, but it can't be parsed at client side.

Question : handling special characters should be done at server side ? (tigase plugin for example ) ?
or it should be handled at client side ?

I've tested it on android client .

@hantu85
Copy link
Contributor

hantu85 commented Feb 19, 2020

Why it should? XMPP client is required by the XMPP standard to send valid XML to the XMPP server. According to the XML specifications, some characters are not allowed in the XML or need to be escaped (as they have special meaning). Those characters (listed by XML specification) should be escaped by the XMPP client before sending those chars to the XMPP server.

It would be good to mention that not all characters which you mentioned need to be escaped, ie. @, %, ^, [, ], (, ) are valid XML characters not needed to be escaped. Escaping is required for <, >, &, ', " characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants