1.1.0 • Published 3 years ago
htmlspecialchars_decode v1.1.0
htmlspecialchars_decode
What is htmlspecialchars_decode?
htmlspecialchars_decode is used to decode html entities! This is very useful if, like me, you have to insert things in a php database with the htmlspecialchars()
function and you want to retrieve them in Javascript but in a decoded format ...
How to install?
npm i htmlspecialchars_decode
Now, how to use?!
It's very simple
const htmlspecialchars_decode = require('htmlspecialchars_decode');
let msg = "& < "";
console.log(msg)
// And now, with the module!
console.log(htmlspecialchars_decode(msg))
I hope I would have helped you ^^
Made by Cetus