Repository navigation
markdown-pdf-export 2.4.0
·
33 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Security
- Raw HTML in the Markdown can no longer run code or load other pages while the PDF is printed.
By default ("sanitize": "safe")<script>,<iframe>,<object>,<applet>,<frameset>,
<noembed>and<noframes>are removed with their content;<embed>,<frame>,<meta>,
<base>,<link>,<form>,<title>,<textarea>,<xmp>and<plaintext>are shown as
text;on*event handlers andjavascript:/vbscript:/ non-imagedata:links are
disarmed. The page is also printed with JavaScript off, under a Content Security Policy that
blocks scripts, frames and plugins, and an export that tries to navigate away is stopped.
<style>, inline styles, images and page breaks keep working; code blocks are never changed. font_family,heading_font_familyand the custom stylesheet can no longer close the
<style>element they are placed in.
Changed
- Behaviour change: documents that relied on raw
<script>or<iframe>lose them. Set
"sanitize": "none"in a settings file, or pass--sanitize none, for documents you trust.
Front matter and the MCP tool cannot change this setting. - The export result has
sanitizeandremoved_html(what the filter took out); the command
line prints the latter.doctorshows thesanitizesetting.
npm: https://www.npmjs.com/package/markdown-pdf-export/v/2.4.0