【发布时间】:2013-03-28 22:59:03
【问题描述】:
在下面的示例中,内容“这里还有一些文本”显然位于结束 HTML 标记之外。但是当我运行the script as a web app and view the page source 时,它位于结束标记内。这是因为 caja 正在清理格式错误的 HTML 吗?为什么要以这种方式清理而不是通知我错误?
气体代码:
function doGet() {
var ParagraphContent ='So much to do in so little time... '
var HTMLToOutput = '<html><h1>A header</h1><p>' + ParagraphContent + '</p></html>';
var HtmlAndMore = HTMLToOutput + 'Here is some more text';
var it = HtmlService.createHtmlOutput(HtmlAndMore);
Logger.log(HtmlAndMore)
return it
}
GAS 脚本编辑器日志输出:
<html><h1>A header</h1><p>So much to do in so little time... </p></html>Here is some more text
【问题讨论】:
标签: google-apps-script google-caja