diff options
Diffstat (limited to 'swift/common/request_helpers.py')
-rw-r--r-- | swift/common/request_helpers.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/swift/common/request_helpers.py b/swift/common/request_helpers.py index 03d571f1f..e4ab41d3b 100644 --- a/swift/common/request_helpers.py +++ b/swift/common/request_helpers.py @@ -48,6 +48,15 @@ OBJECT_SYSMETA_CONTAINER_UPDATE_OVERRIDE_PREFIX = \ 'x-object-sysmeta-container-update-override-' +if six.PY2: + import cgi + + def html_escape(s, quote=True): + return cgi.escape(s, quote=quote) +else: + from html import escape as html_escape # noqa: F401 + + def get_param(req, name, default=None): """ Get parameters from an HTTP request ensuring proper handling UTF-8 |