PhoenixKit 1.7.197: Safer rich-text links and three new doctor checks
PhoenixKit 1.7.197 closes a gap that let disguised javascript: links through the HTML cleaner, adds migration V151 for the Catalogue and CRM modules, and makes mix phoenix_kit.doctor catch two more setup problems.
The cleaner used for rich text blocked only the plain words javascript:, vbscript: and data: in links and image sources, so encoded or split-up variants got through. It now allows only http, https, mailto, tel and relative links, checked after decoding, and drops any other link instead of rewriting it.
V151 adds a supplier source and a primary-supplier flag to Catalogue’s item suppliers, and makes CRM contact and company emails case-insensitive. The doctor gains Schema Drift and Child Start Order checks, finds prefixed installs, and its Oban Configuration check no longer reports 0 queues. The admin sidebar no longer changes width by a few pixels when a modal opens.
Upgrading
Run mix phoenix_kit.update for V151. Changing the CRM email columns rewrites those tables under a lock, so on large CRM tables plan a quiet moment.
Full release notes: PhoenixKit 1.7.197
1.7.197 · 16 July 2026
Added
- V151:
supplier_source(crm_company | crm_contact | local, CHECK-backed) andis_primary(partial-unique, one primary per item) columns onphoenix_kit_cat_item_supplier_info— completes the V149 junction for the mergedphoenix_kit_cataloguesourcing layer, which reads/writes both on every insert/update. - V151: normalizes
phoenix_kit_crm_contacts.email/phoenix_kit_crm_companies.emailtocitext, a prerequisite for case-insensitive email matching in the CRM v2 backfill and the user↔contact bridge. mix phoenix_kit.doctorgains three checks: Schema Drift (a version marker claiming a column that’s actually missing at the resolved prefix — surfaces an installer/migration-runner drift with no other self-service signal), Child Start Order (reads the hostapplication.exand fails whenPhoenixKit.Supervisor/Obanare listed before the Repo, the boot crash class where Oban opens a pool against a database connection that doesn’t exist yet), and prefix resolution now goes through the samePrefixConfig.resolve_prefix/1asphoenix_kit.update --status, fixing doctor reporting “not installed” against a prefixed install it was actually diagnosing at the wrong schema.
Fixed
- Closed an
HtmlSanitizerstored-XSS bypass: thehref/srcscheme filter only blacklisted literaljavascript:/vbscript:/data:, so entity-encoded (javascript:), whitespace-obfuscated (java	script:), and raw-control-char variants slipped through into any markdown-rendered rich-text sink. Replaced it with an allowlist (http/https/mailto/tel+ relative/fragment URLs) evaluated over a decoded, control-char-stripped, normalized value — the transform only ever removes an attribute, never rewrites the visible URL. - Fixed the admin sidebar’s width flipping by ~15px around a modal’s scroll-lock on long admin pages (the drawer grid’s auto-sized sidebar column resolves differently depending on whether the page root currently has a scrollbar).
phoenix_kit.doctor‘s Oban Configuration check reported0 queues, 0 pluginsbecause doctor’s own pool-capping zeroed the app-env Oban config before the check read it; now snapshotted before capping.- Silenced a dialyzer false positive (
call_without_opaque) inQrLogin.location_for/1’sTask.Supervisor.async_nolink+Task.yield/Task.shutdownidiom, matching the existingauth.exignore-list precedent for the same opaque-widening class.
PhoenixKit 1.7.197. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.