def quote_etag(etag):
    """
    Wraps a string in double quotes escaping contents as necesary.
    """
    return '"%s"' % etag.replace('\\', '\\\\').replace('"', '\\"')
dataset/ETHPy150Open CollabQ/CollabQ/vendor/django/utils/http.py/quote_etag/original