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".
1
cloudtruth --project Demo parameter list -v
2
+-----------+--------------+---------+----------+--------+-------------+
3
| Name | Value | Source | Type | Secret | Description |
4
+-----------+--------------+---------+----------+--------+-------------+
5
| quoted | "in quotes" | default | internal | false | |
6
+-----------+--------------+---------+----------+--------+-------------+
Copied!
Creating a CloudTruth template that renders {{quoted}} will result in the following output.
1
cloudtruth --project Demo templates get quotations
2
"in quotes"
Copied!

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.
1
cloudtruth --project Demo templates get quotations
2
"in quotes"
Copied!
Last modified 2mo ago
Copy link