Escape and Encode Data
We have the key to getting out
Remember the escape room boom? While certainly fun, these puzzle rooms can also bring on some serious anxiety!
Alas, sometimes these feelings come up when developing complex logic and trying to figure out how to handle special characters, such as single quotes or ampersands. Working with SQL queries and HTML documents can make you feel like you’re stuck in an escape room.
But just as there is always a key to the room if you can find it, PMG has added a configuration setting to escape and encode runtime data.
The Set Variables and Update Variables with Expression workflow actions now support automatic escaping and encoding data for SQL, XML, JSON, and HTML.
Perhaps you have a variable for a file path or a URL with characters that are reserved in another format. Previously, this could cause runtime issues when setting variables.
But now there is an Escape/Encode Runtime Data checkbox that can be selected when setting the source value for variable(s) that use SQL, XML, JSON or HTML.
Note that when you set your source variable to use Text, the Escape/Encode Runtime Data checkbox will not display as an option. But when you need it, it will be there!
We hope this tip helps you escape from a tricky situation. ?