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
npm install html-converter-react
Typescript
Module System
Node Version
NPM Version
39.4
Supply Chain
68.4
Quality
73.5
Maintenance
100
Vulnerability
98.9
License
TypeScript (88.39%)
JavaScript (11.61%)
Total Downloads
11,219
Last Day
8
Last Week
35
Last Month
117
Last Year
2,169
35 Commits
2 Watching
1 Branches
1 Contributors
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
Publised On
02 Feb 2023
Cumulative downloads
Total Downloads
Last day
300%
8
Compared to previous day
Last week
59.1%
35
Compared to previous week
Last month
-0.8%
117
Compared to previous month
Last year
112.9%
2,169
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
detected GitHub workflow tokens with excessive permissions
Details
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
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
102 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-23
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 Morereact-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