Java basically supports control characters in strings but xml parser recognize them as illegal characters. so if you are sending control characters openfire will close the connection immediately because of malformed data.
fixed by replacing control characters with nothing
With this fix also the valid character
u000D is removed. And there are much more illegal characters. On server side there is a similar issue http://issues.igniterealtime.org/browse/OF-391
Allowed Chars ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
yep, u000D is removed. in which situation do you need the cr flag?
Mass closing of resolved issues