bestlibre / hassio-addons

173 stars 110 forks source link

Caddy proxy: wrong encoding (escape single and double quotes) in raw_config #100

Closed regystro closed 5 years ago

regystro commented 5 years ago

Hi. It's not possible to use single and/or double quotes, since the parser encodes them to htmlentities:

 "raw_config": [
    {
      "line": "# Single and double quote test: \" ' " ' \u0022"
    }
  ]

Then if you enter the container and cat /tmp/caddy.conf, this is what you get:

# Single and double quote test: " ' " ' "

I think that at least \" should be encoded as ". Could you please fix this in order to be able to escape and write double quotes to the raw_config section? That way we'll be able to use spaces in some config options.

Thank you

bestlibre commented 5 years ago

I will look at it.

bestlibre commented 5 years ago

Should be fixed with last version (2b0735015aab15b22f17c0d41caa44c12b6b0b35)

regystro commented 5 years ago

Thanks, it's working flawlessly.