Skip to content

Posts 0.1.7: Security fix for scripts hidden in post content

Posts 0.1.7 is a security release. The post’s page in the admin showed the HTML written in a post’s content as it was, so a post could carry a script that ran in the browser of anyone who opened it, admins included.

The content is now rendered with the MDEx markdown library and the result is cleaned with PhoenixKit’s HTML sanitizer before it is shown. Markdown renders as before: tables, strikethrough, task lists, links, smart quotes and code blocks with their language class.

Two smaller changes: the admin page titles of the posts list, groups and settings now sit in the top bar, with their buttons in a slim toolbar, and + New Post opens the editor without a full page reload.

Upgrading

Update soon if people other than trusted staff can write posts. Posts 0.1.7 adds mdex as a dependency, replacing Earmark. There is no migration.

Full release notes: Posts 0.1.7

0.1.7 · 18 June 2026

Security

  • Sanitize the rendered post-detail markdown HTML via PhoenixKit.Utils.HtmlSanitizer to strip stored-XSS vectors from user-authored post content. The previous Earmark path emitted raw HTML (escape: false) unsanitized.

Changed

  • Render post-detail markdown with MDEx instead of the now-retired Earmark. phoenix_kit 1.7.161 dropped its transitive earmark dependency, so the module now declares mdex directly. Rendering is preserved (GFM, smart typography, language- code classes).
  • Upgrade dependencies: phoenix_kit 1.7.161, phoenix_kit_comments 0.2.11.

Fixed

  • The Posts toolbar’s “+ New Post” link now uses live navigation (navigate) instead of a full-page href, matching every other new/edit/view link in the module.
  • Corrected the PhoenixKitPosts.Web.Settings moduledoc route — the settings page mounts at {prefix}/admin/settings/posts (registered under settings_tabs), not {prefix}/admin/posts/settings.

Posts 0.1.7. Install or update: {:phoenix_kit_posts, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.