sanitize-html
sanitize-html copied to clipboard
Clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis. Built on htmlparser2 for speed and tolerance
I'm trying to sanitize a string that is provided as data for xml-configurator, this data is in the form of { key:value} and it's applied among the xml so it...
Not sure if that's not postcss issue but when importing the library on the browser I'm getting the following: ``` browser-external:path:9 Uncaught (in promise) Error: Module "path" has been externalized...
## To Reproduce It always happens in browserland. See this simple codesandbox: https://codesandbox.io/s/festive-kirch-d1geou?file=/src/index.js Original message is below but note this is *not* React-specific. -Tom ## Original message Step by step...
## The problem to solve I use `sanitize-html` in an MEAN (Mongo Express Angular Node) application, and the `sanitize-html` options are flexible and powerful. For example: sanitizeHtml : { allowedStyles...
## Question or comment I am looking to wrap an tag into tag. However, the documentation does seem to describe such functionality, only trimming tags. Any chance you could suggest...
## To Reproduce From the Node REPL: ``` > const s = require('sanitize-html') undefined > s("here's a string with a tag.", {disallowedTagsMode: "escape"}) "here's a string with a <wacky> tag.</wacky>"...
I found several variants of the library's incorrect behavior. In the examples below, it is possible to add any html tag (closing tag with valid HTML as well as opening...
(As reported on https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1005867) Running the testsuite on Debian testing (which has version 7.2 of htmlparser2) fails. Could you adapt to sanitize-html to the current version of htmlparser2?
Step by step instructions to reproduce the behavior: 1. Create a SVG element with some gradient inside 2. Insert the code as v-html in Vue e.g. 3. Set allowedTags to:...