Skip to content

fix(ios): HTML entities encoding/decoding improvements - #849

Merged
szydlovsky merged 7 commits into
mainfrom
@exploif/ios-named-entities
Nov 3, 2026
Merged

szydlovsky merged 7 commits into
mainfrom
@exploif/ios-named-entities

Conversation

@exploIF

@exploIF exploIF commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes: #818 by improving the way we escape HTML entities for the whole string.

Also improves our entities encoding/decoding within html attributes - like link and image URIs, mention custom attributes and custom style data by creating dedicated encoding/decoding methods for them.

Test Plan

Screenshots / Videos

Compatibility

OS Implemented
iOS ✅
Android ❌
Web ❌

Checklist

  • E2E tests are passing
  • Required E2E tests have been added (if applicable)

@szydlovsky szydlovsky changed the title fix(ios): decode named HTML entities like &nbsp fix(ios): HTML entities encoding/decoding improvements Nov 2, 2026
@szydlovsky
szydlovsky marked this pull request as ready for review November 2, 2026 16:42
Copilot AI balanced review requested due to automatic review settings November 2, 2026 16:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Attribute references are decoded inconsistently: canonical HTML leaves some references encoded, while Gumbo-processed HTML decodes them twice, altering URLs and other attribute values.

2 open issues
What changed in this PR

Improves iOS HTML entity handling to address #818 and preserve text and attribute values when importing and saving HTML.

Changes:

  • Expands named-entity decoding and escapes text in a single pass.
  • Adds dedicated attribute encoding and decoding for links, images, mentions, and custom styles.
  • Adds a Maestro flow checking named-entity rendering.
File Description
ios/​htmlParser/​HtmlParser.mm Applies attribute helpers during parsing and serialization.
ios/​extensions/​StringExtension.mm Expands entity handling and implements attribute helpers.
ios/​extensions/​StringExtension.h Declares the new attribute helpers.
.maestro/​enrichedText/​flows/​named_html_entities.yaml Tests decoded named entities in rendered text.

Review effort: Balanced

Comment thread ios/extensions/StringExtension.mm Resolved
Comment thread ios/htmlParser/HtmlParser.mm Resolved
@szydlovsky
szydlovsky force-pushed the @exploif/ios-named-entities branch from f75474f to 7342c6a Compare November 2, 2026 19:19
@szydlovsky
szydlovsky merged commit 3c539ee into main Nov 3, 2026
9 checks passed
@szydlovsky
szydlovsky deleted the @exploif/ios-named-entities branch November 3, 2026 11:18
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.

[iOS] Named entity   rendered literally, then saved as  

3 participants