Skip to content

fix(link): encode spaces in link URLs - #3079

Open
Anurag-S1ngh wants to merge 1 commit into
codex-team:nextfrom
Anurag-S1ngh:fix/1748-link-spaces
Open

Anurag-S1ngh wants to merge 1 commit into
codex-team:nextfrom
Anurag-S1ngh:fix/1748-link-spaces

Conversation

@Anurag-S1ngh

Copy link
Copy Markdown
Contributor

Summary

The Link inline tool rejected any URL containing a space, even though spaces are valid in URLs once encoded. This made links with spaces in paths unusable.

The tool now validates that the value is not empty and has no control whitespace, then encodes regular spaces as %20 before adding the protocol.

Changes

  • Allow spaces in link values and encode them as %20.
  • Keep rejecting empty values, new lines and tabs.
  • Add a Cypress test that applies a link containing a space and checks the resulting href.

Testing

  • yarn lint
  • yarn test:e2e (390 passing)

Closes #1748

@Anurag-S1ngh
Anurag-S1ngh requested a review from neSpecc as a code owner December 2, 2026 16:19

This branch has not been deployed

No deployments
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.

[Bug] Pasted link cannot include spaces

1 participant