Fix HTML entities appearing in copied output for story titles#232
Open
Fix HTML entities appearing in copied output for story titles#232
Conversation
story_title from the Algolia API can contain HTML entities (', &, etc.) which were passed through to the output without decoding. comment_text was already decoded via htmlToText but story_title was not. https://claude.ai/code/session_01M9HD38yY9BBnzPzdKuGDR3
Contributor
|
Claude finished @simonw's task —— View job PR Review Complete ✅Todo List:
Review FeedbackThis is a well-executed bug fix that addresses a legitimate issue with HTML entity encoding in story titles. Here's my detailed analysis: ✅ Code Quality & Best Practices
✅ Bug Fix Analysis
✅ Performance Considerations
✅ Security Assessment
|
URLs in HN comment text (from Algolia API) contain percent-encoded characters like %C4%81 (ā) and %3C (<). The htmlToText function decoded HTML entities but left percent-encoding intact, so copied output contained raw sequences like K%C4%81k%C4%81p%C5%8D instead of Kākāpō. Add a post-processing step that decodes consecutive %XX sequences via decodeURIComponent, with a try/catch fallback for malformed sequences. https://claude.ai/code/session_01M9HD38yY9BBnzPzdKuGDR3
Deploying tools with
|
| Latest commit: |
094ae47
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ff7a703e.tools-b1q.pages.dev |
| Branch Preview URL: | https://claude-fix-clipboard-url-enc.tools-b1q.pages.dev |
Contributor
|
Claude finished @simonw's task —— View job PR Review Complete ✅Todo List:
Review FeedbackThis PR addresses HTML entity encoding issues in story titles from the Algolia API. Here's my detailed analysis: ✅ Code Quality & Best Practices
✅ Bug Fix Analysis
✅ Performance Considerations
✅ Security Assessment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
story_title from the Algolia API can contain HTML entities (',
&, etc.) which were passed through to the output without decoding.
comment_text was already decoded via htmlToText but story_title was not.
https://claude.ai/code/session_01M9HD38yY9BBnzPzdKuGDR3