Templates render quotations in key values as quot

Overview

CloudTruth Templates use the mustache templating language to transform and render data. When rendering parameters that contain values with quotation marks, templates convert the question mark to " .

Parameter named quoted with a value "in quotes".

cloudtruth --project Demo parameter list -v
+-----------+--------------+---------+----------+--------+-------------+
| Name      | Value        | Source  | Type     | Secret | Description |
+-----------+--------------+---------+----------+--------+-------------+
| quoted    | "in quotes"  | default | internal | false  |             |
+-----------+--------------+---------+----------+--------+-------------+

Creating a CloudTruth template that renders {{quoted}} will result in the following output.

cloudtruth --project Demo templates get quotations
"in quotes"

Resolution

You can use the triple mustache syntax {{{KEY_NAME}}} to return unescaped HTML. This syntax allows you to obtain values keeping the quotation mark.

From our example above, creating a CloudTruth template that renders {{{quoted}}} will result in the following output.

cloudtruth --project Demo templates get quotations
"in quotes"

Last updated

Copyright© 2023 CloudTruth