1.0.3 • Published 2 years ago

angular-brackets-to-html-entites v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Hi Users!

Description

This package contains a function 'angularBracketsToEntites' which accepts a input string. If the string contains '<' & '>' it replaces it with '<' & '>' respectively and returns it. It is used to avoid cross site scripting as innerHTML renders the string with '<' '>' as valid tag if contains valid tag. Replacing it with the above entity will be rendered as string not as a tag.

How to use

npm i angular-brackets-to-html-entites
  • Demo purpose I have used console.log
const { angularBracketsToEntites } = require("../removeAngularBracket/main");

console.log(angularBracketsToEntites("<h1>Hello</h1>"));

Thank you for Using!!

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago