def _escape(self, text):
ret = EMPTYSTRING if text is None else str(text)<EOL>if self.escape:<EOL><INDENT>return html_escape(ret)<EOL><DEDENT>else:<EOL><INDENT>return ret<EOL><DEDENT>
Escape text according to self.escape