-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Code of Conduct
- I agree to follow this project's Code of Conduct.
Submission validity
- This is not a personal support request, that should be posted on discussions community.
- I checked current issues and this request isn't a duplicate of an existing issue, opened or closed.
Self troubleshooting
- I've read the documentation and made sure to follow it.
- I've read the troubleshooting first steps and frequent issues guides.
Version
1.9.2
Description
When shortening the ULR that contain slashes YOURLS strip them when saving to database.
Expectation
I have application that contain JSON in URL hash if the strings contain quotations the ULR doesn't work when using shortener. Because " inside string in JSON become \" and YOURLS saves " and you end up with invalid JSON.
Reproduction steps
- Add this URL:
https://terminal.jcubic.pl/404#[[0,1,%22jargon%20\%22Don't%20do%20that%20then!\%22%22]]that should run a command in the terminal - Open the short link
- The command don't appear (the web app ignores any JSON errors)
Context
I think that the tool should not do any manipulation to the URL hash, it should always be passed as is. Of course, with escapes and unescapes when writing and reading from database.
Browser do some escaping when copying full URL, here is same URL with hash copied separately, so there are no escaping:
https://terminal.jcubic.pl/404#[[0,1,"jargon%20\"Don't%20do%20that%20then!\""]]
As you can see, there is \" in the hash. When copying this URL quotations and backsplashed are removed.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working