Make Copy Link to Highlight links more reslient to url encoding#1562
Open
cdrini wants to merge 2 commits into
Open
Make Copy Link to Highlight links more reslient to url encoding#1562cdrini wants to merge 2 commits into
cdrini wants to merge 2 commits into
Conversation
64e871b to
0d1c686
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1562 +/- ##
==========================================
+ Coverage 63.53% 63.68% +0.15%
==========================================
Files 67 67
Lines 6197 6185 -12
Branches 1376 1374 -2
==========================================
+ Hits 3937 3939 +2
+ Misses 2221 2207 -14
Partials 39 39 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sharing the previous link on facebook messenger resulted in the parameters being re-encoded, which broke the rather brittle custom url encoding the text parameter was using. Switched to a technique where the delimeter characters are removed from the source text, so the entire string can safely be encoded as a whole! Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0d1c686 to
8923338
Compare
schu96
requested changes
Jun 26, 2026
Collaborator
schu96
approved these changes
Jul 1, 2026
schu96
left a comment
Collaborator
There was a problem hiding this comment.
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.




Sharing a "Copy link to highlight" link on eg facebook messenger resulted in the parameters being re-encoded:
Input link:
https://archive.org/details/macklife0000mack/page/246/mode/2up?text=246:to%20some%20extent%20%E2%80%98silly%E2%80%99.-,But%20I%20can,We%E2%80%99re%20all%20%E2%80%98them%E2%80%99.,-Lee%20MackLink in facebooks messenger:
https://archive.org/details/macklife0000mack/page/246/mode/2up?text=246%3Ato%20some%20extent%20%E2%80%98silly%E2%80%99.-%2CBut%20I%20can%2CWe%E2%80%99re%20all%20%E2%80%98them%E2%80%99.%2C-Lee%20MackNote the parameter becomes fully url encoded, with eg
:being changed to%3A, and also,being replaced.This broke the rather brittle custom url encoding the text parameter was using. Switched to a technique where the delimiter characters are removed from the source text, so the entire string can safely be encoded as a whole!
Test here: https://deploy-preview-1562--ia-bookreader.netlify.app/details/theworksofplato01platiala