{"action":"created","issue":{"url":"https://api.github.com/repos/YOURLS/YOURLS/issues/1651","labels_url":"https://api.github.com/repos/YOURLS/YOURLS/issues/1651/labels{/name}","comments_url":"https://api.github.com/repos/YOURLS/YOURLS/issues/1651/comments","events_url":"https://api.github.com/repos/YOURLS/YOURLS/issues/1651/events","html_url":"https://github.com/YOURLS/YOURLS/issues/1651","id":29030701,"number":1651,"title":"URL Encoding gets decoded before saving to db.","user":{"login":"Arujei","id":626513,"avatar_url":"https://avatars.githubusercontent.com/u/626513?v=3","gravatar_id":"","url":"https://api.github.com/users/Arujei","html_url":"https://github.com/Arujei","followers_url":"https://api.github.com/users/Arujei/followers","following_url":"https://api.github.com/users/Arujei/following{/other_user}","gists_url":"https://api.github.com/users/Arujei/gists{/gist_id}","starred_url":"https://api.github.com/users/Arujei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arujei/subscriptions","organizations_url":"https://api.github.com/users/Arujei/orgs","repos_url":"https://api.github.com/users/Arujei/repos","events_url":"https://api.github.com/users/Arujei/events{/privacy}","received_events_url":"https://api.github.com/users/Arujei/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/YOURLS/YOURLS/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/YOURLS/YOURLS/labels/core","name":"core","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"ozh","id":223647,"avatar_url":"https://avatars.githubusercontent.com/u/223647?v=3","gravatar_id":"","url":"https://api.github.com/users/ozh","html_url":"https://github.com/ozh","followers_url":"https://api.github.com/users/ozh/followers","following_url":"https://api.github.com/users/ozh/following{/other_user}","gists_url":"https://api.github.com/users/ozh/gists{/gist_id}","starred_url":"https://api.github.com/users/ozh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozh/subscriptions","organizations_url":"https://api.github.com/users/ozh/orgs","repos_url":"https://api.github.com/users/ozh/repos","events_url":"https://api.github.com/users/ozh/events{/privacy}","received_events_url":"https://api.github.com/users/ozh/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/YOURLS/YOURLS/milestones/5","html_url":"https://github.com/YOURLS/YOURLS/milestones/1.8","labels_url":"https://api.github.com/repos/YOURLS/YOURLS/milestones/5/labels","id":459167,"number":5,"title":"1.8","description":"* Cron emulation (#1233)\r\n* *Maybe* convert to PDO (see https://github.com/YOURLS/YOURLS/issues/1544#issuecomment-30623214)\r\n* Various internal API enhancements","creator":{"login":"LeoColomb","id":846943,"avatar_url":"https://avatars.githubusercontent.com/u/846943?v=3","gravatar_id":"","url":"https://api.github.com/users/LeoColomb","html_url":"https://github.com/LeoColomb","followers_url":"https://api.github.com/users/LeoColomb/followers","following_url":"https://api.github.com/users/LeoColomb/following{/other_user}","gists_url":"https://api.github.com/users/LeoColomb/gists{/gist_id}","starred_url":"https://api.github.com/users/LeoColomb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeoColomb/subscriptions","organizations_url":"https://api.github.com/users/LeoColomb/orgs","repos_url":"https://api.github.com/users/LeoColomb/repos","events_url":"https://api.github.com/users/LeoColomb/events{/privacy}","received_events_url":"https://api.github.com/users/LeoColomb/received_events","type":"User","site_admin":false},"open_issues":23,"closed_issues":5,"state":"open","created_at":"2013-10-19T13:34:09Z","updated_at":"2015-10-04T15:42:29Z","due_on":null,"closed_at":null},"comments":15,"created_at":"2014-03-08T21:41:52Z","updated_at":"2015-10-06T08:48:36Z","closed_at":null,"body":"When shorting this URL:\r\n/Page.jsp?tI=ND6AWbgS5U4ky08ndJoxQg%253D%253D&uI=sA2%252BUi1VNUjpVsdS0GJGtw%253D%253D\r\n\r\nit gets saved as:\r\n/Page.jsp?tI=ND6AWbgS5U4ky08ndJoxQg==&uI=sA2+Ui1VNUjpVsdS0GJGtw==\r\n\r\nLooks the URL encoding gets decoded."},"comment":{"url":"https://api.github.com/repos/YOURLS/YOURLS/issues/comments/145787563","html_url":"https://github.com/YOURLS/YOURLS/issues/1651#issuecomment-145787563","issue_url":"https://api.github.com/repos/YOURLS/YOURLS/issues/1651","id":145787563,"user":{"login":"davidolrik","id":1990,"avatar_url":"https://avatars.githubusercontent.com/u/1990?v=3","gravatar_id":"","url":"https://api.github.com/users/davidolrik","html_url":"https://github.com/davidolrik","followers_url":"https://api.github.com/users/davidolrik/followers","following_url":"https://api.github.com/users/davidolrik/following{/other_user}","gists_url":"https://api.github.com/users/davidolrik/gists{/gist_id}","starred_url":"https://api.github.com/users/davidolrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidolrik/subscriptions","organizations_url":"https://api.github.com/users/davidolrik/orgs","repos_url":"https://api.github.com/users/davidolrik/repos","events_url":"https://api.github.com/users/davidolrik/events{/privacy}","received_events_url":"https://api.github.com/users/davidolrik/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T08:48:35Z","updated_at":"2015-10-06T08:48:35Z","body":"> Similarly if someone enters http://example.com/hello world%20yay, the end result should be http://example.com/hello%20world%20yay and not double-encoding the second %20.\r\n\r\nI disagree here, if I enter a url with the characters %20 in it I expect it to be encoded as %2520 - you can't mix entering stuff to be encoded, and stuff that shouldn't be encoded.\r\n\r\nIn your example above you *should* double encode the second %20, as you can't have a url both be unencoded and encoded at the same time."}}