def _safe_html(s):
 return cgi.escape(s, quote=1).replace("'", '&#39;')

def _safe_html ( s ) : return cgi . escape ( s , quote = 1 ) . replace ( "'" , '&#39;' )
escape text to make it safe to display .