Change:
Issue Type: <bBug</bWhen debugging code and a link has a URI encode clinking the link in the debug console will auto decode the URL. This causes issues as some APIs expect the paramaters to be URI encoded. When just logging links to the terminal it doesn't do that. Try the following code: Steps to reproduce a breakpoint on debugging url into the debug console +click and navigate to the URL. It will automatically decode to , with no way to disable this. Runnig the code normally and following the url in the terminal doesn't do this. VS Code version: Code - Insiders 1.52.0-insider (, 2020-12-04T10:15:27.849Z) OS version: WindowsNT x64 10.0. <details<summarySystem Info</summary </details<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
This is a fair request. Code pointer PR's to fix this are welcome.
I put a code pointer...
Do you think terminal's behavior is correct or debug's behavior is correct.
I think the reason is !
The correct behavior to me would be not to decode the URI. If I wanted the URI decoded I could do within my code or the equivalent of that in whatever language I choose.
I agree with you
I think we can just get rid of I tried it locally, and it work. But what are the potential problems without
Even if we don't use here, when we call (url), the url inside openerService will also be , which means that the url shown in the pop-up box is actually decode !
You would definitely want to make sure the URL inside the opener matches the URL the user is being served. So I assume you would want to update it in both places I can't think of any consequences of not parsing the URI unless they're using the parsed URI for something besides serving it to the user.
once you have something feel free to provide a PR and and me can review. Thanks!
I think there are a couple of issues here Ctrl+click and navigate to the URL. And the Url should not be decode should not decode the Url console can't open local file, try the following code This PR is mainly to fix 1 and 3 The first problem is actually very easy to solve, just need to pass in the original link The third question I did was to refer to terminal's current solution:
Adding bug label so we get this verified.
It looks like the url opener service still decodes the url, so Logan's initial issue is still present.
So the url you see in the browser is decoded? The reason we didn't touch the opener service is we felt it touched too much code. Although I thought that would only affect the modal shown
Oh, I was hitting the "copy" button to verify the url, but open works. In this scenario, hitting the copy button would result in a broken (decoded) url, we should probably adjust that as well.
can you please look into this if you have time? If not feel free to push to next milestone and assign back to me. Thanks
thanks for cathcing that case. After discussion with we decided to push this part of the fix out of the endgame since it would require a riskier change.
thanks a lot for fixing this. Assingin to February milestone so we get this verified..
still seems to be happening
Will not fix it last game of endgame, pushing out to backlog
I'll investigate this for debt week. I just tested it with my fix commit and it worked so I'll have to bisect and see what broke it nothing pops out to me at the moment.
unassigning myself, feel free to assign back to me if help is needed.

Discussion:
// check with contributed validators const targetURI = typeof target === 'string' ? URI.parse(target) : target; // validate against the original URI that this URI resolves to, if one exists <del> const validationTarget = this._resolvedUriTargets.get(targetURI) ?? targetURI; </del> <ins> const validationTarget = this._resolvedUriTargets.get(targetURI) ?? target; </ins> for (const validator of this._validators) { if (!(await validator.shouldOpen(validationTarget))) { return false;

assert.equal(openCount, 2); }); <ins> test('links aren't manipulated before being passed to validator: PR #118226', async function () { const openerService = new OpenerService(editorService, commandService); openerService.registerValidator({ shouldOpen: (resource) => { // We don't want it to convert strings into URIs assert.strictEqual(resource instanceof URI, false); return Promise.resolve(false); } }); await openerService.open('https://wwww.microsoft.com'); await openerService.open('https://www.microsoft.com??params=CountryCode%3DUSA%26Name%3Dvscode"'); }); </ins> test('links validated by multiple validators', async function () { const openerService = new OpenerService(editorService, commandService);