Commits

Anonymous committed 57d3ed3

werkzeug.escape knows about `__html__` now.

  • Participants
  • Parent commits c6f375a

Comments (0)

Files changed (1)

File 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;')