netlify-playground icon indicating copy to clipboard operation
netlify-playground copied to clipboard

Double quotation marks are not correctly backslashed in the dumped toml file

Open eternal-flame-AD opened this issue 7 years ago • 1 comments

- Do you want to request a feature or report a bug?

Bug.

- What is the current behavior?

Double quotation marks are not correctly backslashed in the dumped toml file

- If the current behavior is a bug, please provide the steps to reproduce.

Dump the following _headers file, which is valid and the double quotation marks would appear on the actual header

/*
    Public-Key-Pins-Report-Only: pin-sha256="[redacted]"; pin-sha256="[redacted]"; max-age=8640000; report-uri="[redacted]"

I got the following result

[[headers]]
for = "/*"
[headers.values]
Public-Key-Pins-Report-Only = "pin-sha256="[redacted]"; pin-sha256="[redacted]"; max-age=8640000; report-uri="[redacted]""

- What is the expected behavior?

The double quotation should be correctly escaped according to the toml specification, e.g.:

[[headers]]
for = "/*"
[headers.values]
Public-Key-Pins-Report-Only = "pin-sha256=\"[redacted]\"; pin-sha256=\"[redacted]\"; max-age=8640000; report-uri=\"[redacted]\""

eternal-flame-AD avatar Dec 10 '18 04:12 eternal-flame-AD

Hi can I take up this issues?

UdokaVrede avatar Aug 16 '21 14:08 UdokaVrede