Loop through and apply all registered attribute filters.
- K: keyof ElementAttributes
Loop through and apply all registered matchers to the string. If a match is found, create a React element, and build a new array. This array allows React to interpolate and render accordingly.
Loop through and apply all registered node filters.
Determine whether the child can be rendered within the parent.
Convert line breaks in a string to HTML
<br/>tags. If the string contains HTML, we should not convert anything, as line breaks should be handled by
<br/>s in the markup itself.
Create a detached HTML document that allows for easy HTML parsing while not triggering scripts or loading external resources.
Convert an elements attribute map to an object map. Returns null if no attributes are defined.
Extract the style attribute as an object and remove values that allow for attack vectors.
Return configuration for a specific tag.
Verify that a node is safe from XSS and injection attacks.
Verify that an HTML tag is allowed to render.
Parse the markup by injecting it into a detached document, while looping over all child nodes and generating an array to interpolate into JSX.
Loop over the nodes children and generate a list of text nodes and React elements.
Deconstruct the string into an array, by replacing custom tokens with React elements, so that React can render it correctly.