werkzeug.escape

werkzeug.escape(s, quote=None)[source]

Replace special characters “&”, “<”, “>” and (”) to HTML-safe sequences.

There is a special handling for None which escapes to an empty string.

Changed in version 0.9: quote is now implicitly on.

Parameters:
  • s – the string to escape.
  • quote – ignored.