-
-
Notifications
You must be signed in to change notification settings - Fork 137
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
Expected Behavior
I use https://github.com/leizongmin/js-xss to do some sanitation of the my html before parsing it and making React elements. I except the sanitized html to be parsed correctly into elements.
Actual Behavior
The html I want to sanitize and parse is this:
<meta name="keywords" content="dette, introfeltet">
<meta name="description" content="Dette er introfeltet.">
<meta name="referrer" content="no-referrer-when-downgrade">
<meta name="robots" content="none">
<meta content="nb_NO" property="og:locale">
<meta content="en_EN" property="og:locale:alternate">
<meta content="nb_NO" property="og:locale:alternate">
<meta content="Samskipnaden Craft" property="og:site_name">
...
Run through the xxs filter I get this:
<meta name="keywords" content="dette, introfeltet">
<meta name="description" content="Dette er introfeltet.">
<meta name="referrer" content="no-referrer-when-downgrade">
<meta name="robots" content="none">
<meta content="nb_NO" property="og:locale">
<meta content="en_EN" property="og:locale:alternate">
<meta content="nb_NO" property="og:locale:alternate">
<meta content="Samskipnaden Craft" property="og:site_name">
...
Run through the html parser I only get at string back looking exactly like the original html—no React elements. Should the parser correctly parse sanitized html?
Parsing the original html gets me the expected React elements.
Steps to Reproduce
Install https://github.com/leizongmin/js-xss and filter some html before parsing it.
Reproducible Demo
Environment
- Version: 0.10.3
- Platform: Node / Next JS
- Browser: / Chrome 81
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested