Skip to content

markdown-pdf-export 2.4.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 15:27
· 33 commits to main since this release
Immutable release. Only release title and notes can be modified.
v2.4.0
4d9e6f7

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 and javascript: / vbscript: / non-image data: 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_family and 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 sanitize and removed_html (what the filter took out); the command
    line prints the latter. doctor shows the sanitize setting.

npm: https://www.npmjs.com/package/markdown-pdf-export/v/2.4.0