Skip to content

fix: decode HTML entities in page titles#171

Merged
HardeepAsrani merged 2 commits into
developmentfrom
fix/issue-174
Jul 3, 2026
Merged

fix: decode HTML entities in page titles#171
HardeepAsrani merged 2 commits into
developmentfrom
fix/issue-174

Conversation

@HardeepAsrani

@HardeepAsrani HardeepAsrani commented Jun 25, 2026

Copy link
Copy Markdown
Member

Titles from get_the_title() pass through the the_title filter (wptexturize/convert_chars), which emits HTML entities such as – for dashes. These were rendered raw in the add data field and also stored in the embedding text. Decode them with html_entity_decode() so the UI and embeddings get clean text.

Pro PR: https://github.com/Codeinwp/hyve/pull/178

Testing

  1. Create or edit a page/post with a dash in the title, e.g. Summer Sale - Up to 50% Off, and publish.
  2. Go to Hyve → Add Data and find that page in the list.
  3. Before fix: the title shows the raw entity, e.g. Summer Sale – Up to 50% Off.
    After fix: it shows the real character, Summer Sale – Up to 50% Off.
  4. Add the page to the knowledge base and confirm the title displays correctly in the data list too.

Extra cases (optional)

  • Pricing -- Plans & Add-ons → checks en-dash + ampersand
  • The "Best" Coffee --- A Review → checks smart quotes + em-dash

Closes: https://github.com/Codeinwp/hyve/issues/174

Titles from get_the_title() pass through the the_title filter
(wptexturize/convert_chars), which emits HTML entities such as
– for dashes. These were rendered raw in the add data field
and also stored in the embedding text. Decode them with
html_entity_decode() so the UI and embeddings get clean text.
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

Plugin build for 4ec9700 is ready 🛎️!

@HardeepAsrani HardeepAsrani requested a review from abaicus June 25, 2026 20:47
@HardeepAsrani HardeepAsrani merged commit 67e61d8 into development Jul 3, 2026
5 of 6 checks passed
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