📜  sanitize 是做什么的 javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:08.557000             🧑  作者: Mango

代码示例1
// our input string to clean
const stringToClean = 'Some text with tags, including a rogue script  def.';

const result = new Sanitizer().sanitize(stringToClean);
// Result: A DocumentFragment containing text nodes and a  element, with a  child element