Utility for converting HTML strings into React components. Converts standard HTML elements, attributes and inline styles into their React equivalents and provides a simple way to modify and replace the content. It is important to understand that this library should not be used as a direct replacement for using properly sanitized HTML and that it only provides the same level of protection that React does which does not provide 100% protection. All HTML should be properly sanitized using a dedicated sanitization library (such as do purify for node/js) before being passed to this library to ensure that you are fully protected from malicious injections. Including a sanitizer as part of the library means it is making decisions for you that may not be correct. It is up to you to decide what level of sanitization you need and to act accordingly. Some users may already be sanitizing on the server or others may have specialized requirements that cannot be covered by a generic implementation.

Features

  • Try the Live Demo
  • All HTML should be properly sanitized using a dedicated sanitisation library
  • The transform function will be called for every node that is parsed by the library
  • Allows pre-processing the nodes generated from the html
  • Processes a node and returns the React element to be rendered
  • The library exposes the htmlparser2 library it uses

Project Samples

Project Activity

See All Activity >

Categories

HTML/XHTML

License

MIT License

Follow React HTML Parser

React HTML Parser Web Site

You Might Also Like
Holistically view your business data within a single solution. Icon
Holistically view your business data within a single solution.

For IT service providers and MSPs that need a data platform to manage their processes

BrightGauge, a ConnectWise solution, was started in 2011 to fill a missing need in the small-to-medium IT Services industry: a better way to manage data and provide the value of work to clients. BrightGauge Software allows you to display all of your important business metrics in one place through the use of gauges, dashboards, and client reports. Used by more than 1,800 companies worldwide, BrightGauge integrates with popular business solutions on the market, like ConnectWise, Continuum, Webroot, QuickBooks, Datto, IT Glue, Zendesk, Harvest, Smileback, and so many more. Dig deeper into your data by adding, subtracting, multiplying, and dividing one metric against another. BrightGauge automatically computes these formulas for you. Want to show your prospects how quick you are to respond to tickets? Show off your data with embeddable gauges on public sites.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of React HTML Parser!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript HTML XHTML

Registered

2023-05-03