Passing variable to HTML output and then into a scriptlet

后端 未结 1 1746
一向
一向 2021-01-26 17:46

Code.gs

function doPost(e) {
    ...
    template.data += getCustomerData + "
"; } return template.evaluate().setSandboxMode(H
相关标签:
1条回答
  • 2021-01-26 17:57

    By default the strings are sanitized, converting special characters to their HTML encoded equivalents (such as < becoming &lt;).

    When outputting HTML you must use <?!= to avoid sanitizing the data.

    <?!= data ?>

    See the details on standard & force-printing scriptlets here: https://developers.google.com/apps-script/guides/html/templates#standard_scriptlets

    0 讨论(0)
提交回复
热议问题