1
在下面的例子中,內容「這裏有更多的文字」顯然是在關閉的HTML標籤之外。但是當我運行the script as a web app and view the page source它在結束標記內。這是因爲caja正在消毒格式錯誤的HTML嗎?爲什麼要以這種方式進行消毒,而不是通知我錯誤?當使用GAS createHtmlOutput()方法時,caja是否修復格式錯誤的HTML?
GAS代碼:
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
請在請輸出的地方舉報原因!我知道這已經有幾年了。我不能成爲唯一想要這樣的用戶,對嗎? – CookieCoder