Skip to content

Revert "Fixing the share URL" - #52

Merged
dreampuf merged 1 commit into
masterfrom
revert-51-master
Dec 26, 2025
Merged

dreampuf merged 1 commit into
masterfrom
revert-51-master

Conversation

@dreampuf

@dreampuf dreampuf commented Dec 26, 2025

Copy link
Copy Markdown
Owner

Reverts #51


Note

Fix share link generation

  • In index.html, update copyShareURL to use encodeURIComponent (instead of decodeURIComponent) on editor content before setting location.hash, ensuring valid, shareable URLs.

Written by Cursor Bugbot for commit 54717e6. This will update automatically on new commits. Configure here.

@dreampuf
dreampuf merged commit 7231cb1 into master Dec 26, 2025
@dreampuf
dreampuf deleted the revert-51-master branch December 26, 2025 08:29

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment thread index.html

function copyShareURL(e) {
let content = decodeURIComponent(editor.getSession().getDocument().getValue());
let content = encodeURIComponent(editor.getSession().getDocument().getValue());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compressed URL fallback shows URL-encoded content

The encodeURIComponent call on line 629 makes content URL-encoded before it's compressed in the fallback path (line 649). When loading a compressed URL, LZString.decompressFromEncodedURIComponent returns this encoded string, but there's no matching decodeURIComponent on the load path (line 860). This causes the editor to display URL-encoded content like digraph%20%7B... instead of the original content when the URL shortening service fails and the compressed fallback URL is used.

Additional Locations (1)

Fix in Cursor Fix in Web

@mmpataki

Copy link
Copy Markdown
Contributor

@dreampuf dude its broken again, can you please validate?

@dreampuf

Copy link
Copy Markdown
Owner Author

@mmpataki I don't think decodeURIComponent would help it here.

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