我正在尝试将 Olark 集成到我的应用程序中。为此,我必须在结束 body 标记之前将其放入我的 HTML 中:
<!-- begin olark code --><script data-cfasync="false" type='text/javascript'>/*{literal}<![CDATA[*/
window.olark||(function(c) ... "identify"]});
/* custom configuration goes here (www.olark.com/documentation) */
olark.identify('redacted my code');/*]]>{/literal}*/</script><noscript><a href="someurl" title="Contact us" target="_blank">Questions? Feedback?</a> powered by <a href="http://www.olark.com?welcome" title="Olark live chat software">Olark live chat software</a></noscript><!-- end olark code -->
所以我把这放在我的观点中。但是,得到的只是
<!-- begin olark code --><script data-cfasync="false" type='text/javascript'>//</script><noscript><a href="https://www.olark.com/site/redacted my code/contact" title="Contact us" target="_blank">Questions? Feedback?</a> powered by <a href="http://www.olark.com?welcome" title="Olark live chat software">Olark live chat software</a></noscript><!-- end olark code -->
整个脚本正在转换为一个//
. 通过查看 Play 的文档,我看不出是什么原因造成的。有小费吗?
转义开始于/*{literal}<![CDATA[*/
并结束于/*]]>{/literal}*/