'Encode (escape) special XML characters.
@return: The text with XML special characters escaped.
@rtype: L{Text}'

def escape(self):

    if (not self.escaped):
        post = sax.encoder.encode(self)
        escaped = (post != self)
        return Text(post, lang=self.lang, escaped=escaped)
    return self
