When do I need to do my own XML escaping?

I’ve noticed at least under some circumstances that Smack does not XML encode the values I pass in to various methods. In particular, I’ve noticed this with MultiUserChat.kickParticipant() and with Form.setAnswer(). I have two questions about this.

  1. Is this by design or is it a bug in Smack? (I’m using 3.2.0)

  2. If it is by design, what exactly are the rules for when I need to escape my own XML data?



One thing I forgot to mention. There are some places where Smack does encode it on its own, for example MultiUserChat.changeSubject(). Hence my question.