我非常清楚,我可以用消毒的innerHTML绑定的数据: <div innerhtml.bind="someData | sanitizeHTML"></div>
但是,根据我的观察,这个消毒不仅能消除<script>标签。它不保护从事件驱动的内容,例如用户: "Hi! I am some HTML-formatted data from the server! <button onclick
试图让Aurelia撰写ViewModel-less工作和有一些问题。 我在项目中遇到问题,所以为了测试我克隆了skeleton-typescript项目。 我在src目录中创建了一个test.html页面,其内容为<template><div>Hi I'm a test message</div></template>。 然后,在welcome.html页面中,我在提交按钮 <template>