
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
html-converter-react
Advanced tools
**html-converter-react** is an isomorphic utility function that provides easy way to convert your string into a safely sanitized html. It's built on top of dompurify and it's made to work with react.
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
Socket optimized override available
html-converter-react is an isomorphic utility function that provides easy way to convert your string into a safely sanitized html. It's built on top of dompurify and it's made to work with react.
Works both on server side and client side (CSR/SSR). You can use Next.js/Gatsby.js/CRA
Full documentation on: https://github.com/Blagoj5/html-converter#readme
npm install html-converter-react
yarn add html-converter-react
import { htmlConverterReact } from 'html-converter-react';
const text = '<p>Paragraph</p>';
const textEls = '<p>Paragraph</p><p>Second paragraph</p>';
const dangerousText = '<p>Paragraph<script></script></p>';
const App = () => {
return (
<div>
<h1>My App</h1>
{htmlConverterReact(text)}
{htmlConverterReact(textEls)}
{htmlConverterReact(dangerousText)}
</div>
);
};
Explanation:
<p>Paragraph</p>
(without script tag)Option | Description | Default |
---|---|---|
str | The string to be sanitized and parsed into a html | |
dompurifyConfig | Dompurify options | undefined |
htmlParserConfig | HTMLReactParserOptions | {trim: true} |
FAQs
**html-converter-react** is an isomorphic utility function that provides easy way to convert your string into a safely sanitized html. It's built on top of dompurify and it's made to work with react.
The npm package html-converter-react receives a total of 61 weekly downloads. As such, html-converter-react popularity was classified as not popular.
We found that html-converter-react 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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.