🐛 Fixed unsafe notification HTML - #29756
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run ghost:test:ci:integration |
✅ Succeeded | 3m 10s | View ↗ |
nx run ghost:test:integration |
✅ Succeeded | 3m 28s | View ↗ |
nx run ghost:test:e2e |
✅ Succeeded | 2m 47s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 2m 48s | View ↗ |
nx run ghost-monorepo:lint:boundaries |
✅ Succeeded | 21s | View ↗ |
nx run-many -t test:unit -p ghost |
✅ Succeeded | 34s | View ↗ |
nx run-many -t lint -p ghost,ghost-monorepo |
✅ Succeeded | 19s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 8s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | <1s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-08-04 17:43:18 UTC
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #29756 +/- ##
==========================================
- Coverage 75.54% 75.54% -0.01%
==========================================
Files 1614 1614
Lines 142570 142600 +30
Branches 17609 17615 +6
==========================================
+ Hits 107702 107723 +21
- Misses 33793 33801 +8
- Partials 1075 1076 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ref #29746 Notification messages are rendered as trusted HTML in Admin. Sanitising on read and write protects both new and previously stored records while preserving semantic update-service content and links.
ee602dc to
ddb4670
Compare

What changed
Why
Ghost Admin renders notification messages as HTML. The notification-creation permissions are restricted separately in #29754, but sanitisation is still needed at the rendering trust boundary for service-generated messages and existing stored data.
This follows the server-side sanitisation direction reported by @pptx704 in #29746. The client-side text rendering from that PR is intentionally omitted because normal release notifications rely on links.
Compatibility
The tests include the complete current critical-alert body and all four of its links, plus the current normal release message. The critical alert's inline presentation is intentionally removed; its full semantic content and links remain. This matches the sanitisation already applied to the notification email path. The internal mail-error producer emits plain text and is unchanged.
Testing