function sanitize (text) {
    return text.split('').map(function (char) {
      return char === '<' ? '&lt;' : char === '>' ? '&gt;' : char
    ;}).join('');
  }
// This would ideally need to be stricter/more rigorous
This would ideally need to be stricter/more rigorous
This would ideally need to be stricter / more rigorous
function sanitize (text) {
    return text.split('').map(function (char) {
      return char === '<' ? '&lt;' : char === '>' ? '&gt;' : char
    ;}).join('');
  }
function sanitize ( text ) { return text . split ( '' ) . map ( function ( char ) { return char === '<' ? '&lt;' : char === '>' ? '&gt;' : char ; } ) . join ( '' ) ; }
This would ideally need to be stricter/more rigorous
This would ideally need to be stricter / more rigorous