我为我的页面引入了一串html,除了脚本标签,我认为它是html安全的.我知道三重括号会逃脱html,省略任何脚本标签的步骤是什么?
例
var foo = "<h1>Foo</h1><script>some script that might possibly be in here</script><p>bar</p>
Run Code Online (Sandbox Code Playgroud)
然后在我的.hbs中:
{{{foo}}}
Run Code Online (Sandbox Code Playgroud)
我想看看h1和段落,但是遗漏了脚本.
提前致谢.