code: func writeTokenSanitized(bw *writer, bts []byte) {
  	var qt bool
  	var pos int
  	for i := 0; i < len(bts); i++ {
  		c := bts[i]
  		if !OctetTypes[c].IsToken() && !qt {
  			qt = true
  			bw.write(quote)
  		}
  		if OctetTypes[c].IsControl() || c == '"' {
  			if !qt {
  				qt = true
  				bw.write(quote)
  			}
  			bw.write(bts[pos:i])
  			bw.write(escape)
  			bw.write(bts[i : i+1])
  			pos = i + 1
  		}
  	}
  	if !qt {
  		bw.write(bts)
  	} else {
  		bw.write(bts[pos:])
  		bw.write(quote)
  	}
  }
docs: // writeTokenSanitized writes token as is or as quouted string if it contains
  // non-token characters.
  //
  // Note that is is not expects LWS sequnces be in s, cause LWS is used only as
  // header field continuation:
  // "A CRLF is allowed in the definition of TEXT only as part of a header field
  // continuation. It is expected that the folding LWS will be replaced with a
  // single SP before interpretation of the TEXT value."
  // See https://tools.ietf.org/html/rfc2616#section-2
  //
  // That is we sanitizing s for writing, so there could not be any header field
  // continuation.
  // That is any CRLF will be escaped as any other control characters not allowd in TEXT.