Skip to content

Fixed HTML entities appearing in Portal toast and heading text#27781

Merged
weylandswart merged 1 commit into
mainfrom
weyland-des-1368-handle-apostrophes-in-names-in-portal
May 8, 2026
Merged

Fixed HTML entities appearing in Portal toast and heading text#27781
weylandswart merged 1 commit into
mainfrom
weyland-des-1368-handle-apostrophes-in-names-in-portal

Conversation

@weylandswart
Copy link
Copy Markdown
Contributor

Closes https://linear.app/ghost/issue/DES-1368/handle-apostrophes-in-names-in-portal, https://linear.app/ghost/issue/DES-1359/newsletter-names-with-and-display-incorrectly-in-popups

i18next was escaping apostrophes and ampersands in interpolated values, mangling things like the subscribe toast. Disabled escaping for the portal namespace and removed three older per-call workarounds.

Before After
Screenshot 2026-05-07 at 22 55 08 Screenshot 2026-05-07 at 22 53 49
Screenshot 2026-05-07 at 22 54 49 Screenshot 2026-05-07 at 22 54 31

Closes https://linear.app/ghost/issue/DES-1368/handle-apostrophes-in-names-in-portal, https://linear.app/ghost/issue/DES-1359/newsletter-names-with-and-display-incorrectly-in-popups

i18next was escaping apostrophes and ampersands in interpolated values, mangling things like the subscribe toast. Disabled escaping for the portal namespace and removed three older per-call workarounds.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ceee5358-4f0b-475a-a29c-734618f08248

📥 Commits

Reviewing files that changed from the base of the PR and between f142986 and 72ab130.

📒 Files selected for processing (4)
  • apps/portal/package.json
  • apps/portal/src/components/pages/offer-page.js
  • apps/portal/src/components/pages/recommendations-page.js
  • ghost/i18n/lib/i18n.js

Walkthrough

This PR consolidates i18n interpolation handling for the portal package. The i18n factory in ghost/i18n/lib/i18n.js is updated to route the portal namespace through theme-specific resource generation alongside the existing theme namespace. Corresponding portal UI components in offer-page.js and recommendations-page.js remove explicit interpolation: { escapeValue: false } configuration from their translation calls, delegating interpolation behavior to the i18n infrastructure. The portal package version is bumped to 2.68.34.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main fix: disabling HTML entity escaping in Portal UI text (toast and headings). It directly relates to the changeset's core purpose.
Description check ✅ Passed The description clearly explains the issue (HTML entities appearing in interpolated values), the solution (disabling escaping for portal namespace), and includes before/after screenshots demonstrating the fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch weyland-des-1368-handle-apostrophes-in-names-in-portal

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@weylandswart weylandswart merged commit acc796d into main May 8, 2026
44 checks passed
@weylandswart weylandswart deleted the weyland-des-1368-handle-apostrophes-in-names-in-portal branch May 8, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants