
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
Replaces busted characters carried over from legacy text encodings with the proper UTF-8 character.
Replaces busted characters carried over from legacy text encodings with the proper UTF-8 character.
yarn add utfu || npm install utfu
Say you've got a string that looks like this:
There's no way I'm paying €30 for that!
Pass it to either method, hex, txt, or htx and you'll hopefully get back:
There's no way I'm paying €30 for that!
hex substitutes unicode hex values (ie., \u20ac), which is useful in some contexts. txt substitutes the actual character (ie., €). And htx substitutes the HTML escape sequence (ie., €). See chart here for mappings.
import { hex, txt, htx } from 'utfu'
const dirtyText = 'On a certain level, it�s like shouting �fire� in a crowded theater.'
const cleanText = hex(dirtyText) || txt(dirtyText)
// --> 'On a certain level, it’s like shouting “fire” in a crowded theater.'
const cleanHTML = htx(dirtyText)
// --> 'On a certain level, it’’s like shouting “fire” in a crowded theater.'
yarn run test
👤 Daniel Sieradski hello@self.agency
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator
FAQs
Replaces busted characters carried over from legacy text encodings with the proper UTF-8 characters.
The npm package utfu receives a total of 21 weekly downloads. As such, utfu popularity was classified as not popular.
We found that utfu 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
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated “elf-*” npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Security News
TypeScript 6.0 will be the last JavaScript-based major release, as the project shifts to the TypeScript 7 native toolchain with major build speedups.