How to use the escape function from he

Find comprehensive JavaScript he.escape code examples handpicked from public code repositorys.

5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
    if (node.tag) {
      renderElement(node, isRoot, context);
    } else if (node.isComment) {
      write(("<!--" + (node.text) + "-->"), next);
    } else {
      write(node.raw ? node.text : he.escape(String(node.text)), next);
    }
  }
}

fork icon1
star icon5
watch icon3