title: Flask HTML Escape Decorator
body: <p>How would I use a decorator on a route to HTML escape its output. That is, how do I write the <code>html_escape</code> function here:</p>
  
  <pre><code>@app.route('/')
  @html_escape
  def index():
      return '&lt;html&gt;&lt;/html&gt;'
  </code></pre>
  
  <p>(I feel like there should be an extension for this and other simple decorators)</p>