Commits

Anonymous committed 57d3ed3

werkzeug.escape knows about `__html__` now.

Comments (0)

Files changed (1)

werkzeug/utils.py

     """
     if s is None:
         return ''
+    elif hasattr(s, '__html__'):
+        return s.__html__()
     elif not isinstance(s, basestring):
         s = unicode(s)
     s = s.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')