feat(ui): render GFM and embedded HTML in project READMEs
ReactMarkdown was running with no plugins, so README headers full of raw <div align=center>, tables, <details>/<summary>, and other GFM markup rendered as escaped text. Wire in remark-gfm for tables and GFM features, rehype-raw for embedded HTML, and rehype-sanitize with an extended schema that permits README-typical tags and attributes (align, target, width/height, picture/source, etc.) while still blocking script/iframe/object — READMEs come from external repos so they need adversarial-input handling. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,10 @@
|
||||
"react-dom": "^19.0.0",
|
||||
"react-markdown": "^9.0.1",
|
||||
"react-router-dom": "^7.14.2",
|
||||
"react-vertical-timeline-component": "^3.6.0"
|
||||
"react-vertical-timeline-component": "^3.6.0",
|
||||
"rehype-raw": "^7.0.0",
|
||||
"rehype-sanitize": "^6.0.0",
|
||||
"remark-gfm": "^4.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.0.0",
|
||||
|
||||
Reference in New Issue
Block a user