Skip to content

fix: escape single quotes in narrow links#2115

Open
moksha-hub wants to merge 1 commit intozulip:mainfrom
moksha-hub:fix/2105-escape-single-quotes-in-narrow-links
Open

fix: escape single quotes in narrow links#2115
moksha-hub wants to merge 1 commit intozulip:mainfrom
moksha-hub:fix/2105-escape-single-quotes-in-narrow-links

Conversation

@moksha-hub
Copy link

Add single quote (') to the list of characters that are dot-encoded in narrow link URLs. Some software with URL detection heuristics may interpret a single quote as the end of a URL, causing links to break.

This aligns with the behavior needed for consistent URL detection across different platforms and messaging clients.

Fixes #2105

@chrisbobbe
Copy link
Collaborator

This PR needs tests before it can be reviewed. Also please edit the commit message to follow the project guidelines.

@moksha-hub moksha-hub force-pushed the fix/2105-escape-single-quotes-in-narrow-links branch from 68c5b99 to 7ce5991 Compare February 3, 2026 05:59
@gnprice
Copy link
Member

gnprice commented Feb 9, 2026

Marking this as draft for now to get it out of our queue. @moksha-hub please go ahead and unmark this PR as draft when it's ready for review.

@gnprice gnprice marked this pull request as draft February 9, 2026 23:04
Add single quote (') to the list of characters that are dot-encoded in narrow link URLs. Some software with URL detection heuristics may interpret a single quote as the end of a URL, causing links to break.

This aligns with the behavior needed for consistent URL detection across different platforms and messaging clients.

Fixes zulip#2105
@moksha-hub moksha-hub force-pushed the fix/2105-escape-single-quotes-in-narrow-links branch from 7ce5991 to 85cbeb0 Compare February 11, 2026 11:07
@moksha-hub
Copy link
Author

I've added the requested tests for single quote escaping and updated the commit message.

Regarding the CI failure: The build failed with a Java compilation error in the firebase_messaging dependency (cannot find symbol method fromIntent(Intent) in FlutterShellArgs). This seems to be an upstream issue with the CI environment or dependencies and is unrelated to the changes in this PR (which only touch Dart code in internal_link.dart).

@gnprice @chrisbobbe Please let me know The failure wasn't related to my side of issue I guess..
Thank you.

@moksha-hub moksha-hub marked this pull request as ready for review February 12, 2026 06:22
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.

In narrow links, escape single quotes

3 participants