
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
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.
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 41 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.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.