Author READMEs, release notes, or RFC drafts in GitHub Flavored Markdown with instantaneous live rendering—supporting aligned tables, task checklists, fenced code blocks, and XSS-neutralized HTML export.
Drafting internal architecture RFCs, incident postmortems, or pre-release changelogs in cloud Markdown editors exposes unpublished roadmaps and credentials. At the same time, exporting Markdown straight into blog templates or email tools requires clean semantic HTML free of executable script vectors.
This local renderer parses headings, GFM pipe tables with column alignment, task lists ([x]/[ ]), blockquotes, and fenced code blocks while HTML-escaping every raw tag and blocking javascript: / data: URLs. Images appear as labels in the preview, so pasted tracking pixels never load.
Markdown Rendering & XSS Security Pitfalls
01. Raw HTML Passthrough Enabling Stored XSS
Permissive Markdown parsers pass raw <script> or <img src=x onerror=alert(1)> straight into innerHTML. Escaping all raw HTML tags before inline syntax expansion neutralizes tag injection structurally.
02. Malicious javascript: and data: Link Protocols
Even when HTML tags are escaped, Markdown link syntax [Click](javascript:alert(1)) executes scripts if href schemes are not validated. Allowing only http, https, mailto, and tel links closes this vector.
03. Broken GFM Tables From Missing Delimiter Row
GitHub Flavored Markdown requires a hyphen delimiter line (| :--- | :---: | ---: |) immediately below the header row; omitting it collapses the table back into plain paragraph text.
Supported GitHub Flavored Markdown Syntax
| Element | Markdown Syntax | Rendered Output |
|---|---|---|
| Task Checklist | - [x] Done / - [ ] Todo | Semantic list with disabled checkbox indicators |
| Aligned Table | | :--- | :---: | ---: | | Left, center, and right aligned <table> cells |
| Fenced Code | ```ts ... ``` | Escaped <pre><code> with keyword/string tinting |
| Safe Links | [Docs](https://...) | rel="noopener noreferrer" with protocol sanitizer |
| Raw HTML Input | <script>...</script> | Escaped as harmless literal text (zero execution) |
Worked Engineering Examples
Sanitizing an XSS Payload Embedded in Markdown
Click [here](javascript:alert(1)) or <script>steal()</script>
<p>Click <a href="#blocked-unsafe-url" ...>here</a> or <script>steal()</script></p>
Both the dangerous link scheme and raw script tag are neutralized before DOM rendering or HTML export.
Exporting Clean Semantic HTML for Docs or CMS
Switch preview tab to "Clean HTML" -> Copy or Download .html
Compact semantic <h1>, <table>, <ul>, and <pre><code> markup with zero inline style bloat
Produces clean HTML ready to paste into newsletters, knowledge bases, or static sites.
Frequently Asked Questions
Can I switch between Rendered Preview and Raw Clean HTML output?
Yes. Toggle between Live Preview and Clean HTML in the right-hand pane, and use Copy Output or Download to grab the sanitized HTML markup.
Why are raw HTML tags inside Markdown escaped instead of rendered?
Escaping raw HTML tags guarantees zero XSS execution when pasting untrusted PR comments, user-submitted bug reports, or third-party READMEs into the editor.
Does the editor track word count and heading structure?
Yes. Live badges above the editor report word count and heading count on every keystroke.
Are GitHub task list checkboxes and strikethrough (~~text~~) supported?
Yes. Both GFM task lists (- [x] / - [ ]), strikethrough (~~deleted~~), and alignment-aware pipe tables render out of the box.