
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
ent-replace
Advanced tools
Replacement for abandoned library ent
Without any dependencies and without using of punycode api.
Add to your package.json override:
{
"overrides": {
"ent": "npm:ent-replace"
}
}
and run
npm update
npm i ent-replace
const ent = require('ent');
console.log(ent.encode('<span>©moo</span>'))
console.log(ent.decode('π & ρ'));
<span>©moo</span>
π & ρ
Escape unsafe characters in str with html entities.
By default, entities are encoded with numeric decimal codes.
If opts.numeric is false or opts.named is true, encoding will used named
codes like π.
If opts.special is set to an Object, the key names will be forced
to be encoded (defaults to forcing: <>'"&). For example:
console.log(encode('hello', { special: { l: true } }));
hello
Convert html entities in str back to raw text.
All tests copied from original repository
vitest
FAQs
Replacement for abandoned library "ent". Encode and decode HTML entities
The npm package ent-replace receives a total of 1,176 weekly downloads. As such, ent-replace popularity was classified as popular.
We found that ent-replace demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.