diff options
author | Ryan Siemens <ryanjsiemens@gmail.com> | 2018-10-03 22:33:46 -0700 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2018-10-21 07:17:49 -0700 |
commit | a005a0799c80f8500c5478109d04cda3688e9061 (patch) | |
tree | de9016481918625f1fb44f878015286b3281e310 | |
parent | 0e057153552a56c31b6f53dec6167c619ad7f9c1 (diff) | |
download | markupsafe-a005a0799c80f8500c5478109d04cda3688e9061.tar.gz |
restore __html_format__ method
-rw-r--r-- | src/markupsafe/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/markupsafe/__init__.py b/src/markupsafe/__init__.py index 0bd6fd2..f67e5be 100644 --- a/src/markupsafe/__init__.py +++ b/src/markupsafe/__init__.py @@ -191,11 +191,11 @@ class Markup(text_type): kwargs = _MagicFormatMapping(args, kwargs) return self.__class__(formatter.vformat(self, args, kwargs)) - def __html_format__(self, format_spec): - if format_spec: - raise ValueError('Unsupported format specification ' - 'for Markup.') - return self + def __html_format__(self, format_spec): + if format_spec: + raise ValueError('Unsupported format specification ' + 'for Markup.') + return self # not in python 3 if hasattr(text_type, '__getslice__'): |