Gathering detailed insights and metrics for html-converter-react
Gathering detailed insights and metrics for html-converter-react
Gathering detailed insights and metrics for html-converter-react
Gathering detailed insights and metrics for html-converter-react
react-attr-converter
Convert HTML attribute names to React props
markdown-to-jsx
Convert markdown to JSX with ease for React and React-like projects. Super lightweight and highly configurable.
react-from-dom
Convert HTML/XML source code or DOM nodes to React elements
htmr
Simple and lightweight (< 2kB) HTML to React converter that works in server and browser
Utility functions that convert your string into a safely sanitized html
npm install html-converter-react
Typescript
Module System
Node Version
NPM Version
TypeScript (88.39%)
JavaScript (11.61%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
35 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Feb 02, 2023
Latest Version
2.0.0
Package Id
html-converter-react@2.0.0
Unpacked Size
4.92 kB
Size
2.16 kB
File Count
6
NPM Version
8.15.0
Node Version
16.17.1
Published on
Feb 02, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
1
7
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
1import { htmlConverterReact } from 'html-converter-react'; 2 3const text = '<p>Paragraph</p>'; 4const textEls = '<p>Paragraph</p><p>Second paragraph</p>'; 5const dangerousText = '<p>Paragraph<script></script></p>'; 6 7const App = () => { 8 return ( 9 <div> 10 <h1>My App</h1> 11 {htmlConverterReact(text)} 12 {htmlConverterReact(textEls)} 13 {htmlConverterReact(dangerousText)} 14 </div> 15 ); 16};
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} |
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
110 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More