Skip to content

MAN-1533 punctuation rendering in event titles#4315

Merged
cdoyle-temple merged 6 commits intomainfrom
MAN-1533-punctuation-rendering-in-event-titles
Apr 7, 2026
Merged

MAN-1533 punctuation rendering in event titles#4315
cdoyle-temple merged 6 commits intomainfrom
MAN-1533-punctuation-rendering-in-event-titles

Conversation

@cdoyle-temple
Copy link
Copy Markdown
Member

No description provided.

@cdoyle-temple cdoyle-temple requested a review from sensei100 April 7, 2026 13:36
@sensei100
Copy link
Copy Markdown
Collaborator

@cdoyle-temple I think this still needs the CGI.unescapeHTML in order to handle this:  

@cdoyle-temple
Copy link
Copy Markdown
Member Author

@sensei100 Nokogiri does this already when its .text method is called, so it would be redundant to use both there, but in cases where it can't parse the xml and we rely on the fetch to get the value, an escaped character could slip through. I added a catch for that using the CGI.unescapeHTML.

@sensei100
Copy link
Copy Markdown
Collaborator

sensei100 commented Apr 7, 2026

@cdoyle-temple Sorry, it looks like I didn't paste what I meant to in my original comment. I'm talking about making sure this gets taken care of:  . Can you add a test for that case?

@cdoyle-temple
Copy link
Copy Markdown
Member Author

@sensei100 Yes, a test case was added: spec/services/sync_events_spec.rb:51

@cdoyle-temple
Copy link
Copy Markdown
Member Author

cdoyle-temple commented Apr 7, 2026

@sensei100 On further research, Ruby's CGI.unescapeHTML only decodes 5 HTML entities, not including  . Nokogiri::HTML4.fragment covers the full HTML entity library and all Unicode characters. I substantially simplified the workflow and have tests in place for HTML-entity-encoded characters and Unicode non-breaking spaces — but the fix covers all HTML entities and Unicode, not just those two cases. Also covers percent-encoded values via CGI.unescape.

@cdoyle-temple cdoyle-temple merged commit 8cae800 into main Apr 7, 2026
2 checks passed
@cdoyle-temple cdoyle-temple deleted the MAN-1533-punctuation-rendering-in-event-titles branch April 7, 2026 19:47
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