werkzeug.quote_header_value

werkzeug.quote_header_value(value, extra_chars='', allow_token=True)[source]

Quote a header value if necessary.

New in version 0.5.

Parameters:
  • value – the value to quote.
  • extra_chars – a list of extra characters to skip quoting.
  • allow_token – if this is enabled token values are returned unchanged.