Variable substitution adding HTML special characters

I am using Octopus 3.11.4 and am relying upon variable substitution within my .config files. It seems that using “&quote;” as the substitution value results in a variable substitution of “&quote;”

For example, here’s the value I have configured in a Variable Set…

"""

And here is what is getting replaced in the web.config.

"""

Please let me know how to prevent the HTML escaping of the & character.

Heya :slight_smile:

I am not a fan of linking to previous threads for answers, but there is a bit of a chain here about the design decisions around how the encoding works so for reference here you go:
http://help.octopusdeploy.com/discussions/problems/3609-ampersand-and-escaping-of-environment-variables

The tl;dr; is if you use the Substitute Variables in Files feature as well as the config substitution due to how they behave differently it will not encode your values - its a workaround but it works.

Cheers!
Vanessa

Thank you. I’ve changed my value to use double quotes instead of escaping them.