anti_xss

> this module is best suited for component based front-end frameworks > it is best used inside of a lifecycle hook such as in the example below

Usage no npm install needed!

<script type="module">
  import antiXss from 'https://cdn.skypack.dev/anti_xss';
</script>

README

How to use:

this module is best suited for component based front-end frameworks it is best used inside of a lifecycle hook such as in the example below


import antiXss from 'anti_xss';

//call the module function inside of a component lifecycle hook :)

  componentDidMount(){
    let escapeChars = ['<script>','<SCRIPT>','<Script>','%']
    let whiteListURLS = ['http://goodurl','https://greaturl','https://supersafeurl']
        antiXss.isSafe("app",escapeChars,whiteListURLS)
  }

parameters

params description
"app" ID of the parent node
escapeChars characters not allowed in nodes
whiteListURLS array of allowed URLS