Repository navigation
Closed
Labels
*duplicateIssue identified as a duplicate of another issue(s)bugIssue identified by VS Code Team member as probable bugmarkdown-extThe Markdown extension: language features and previewuriwebviewWebview issues
Milestone
Description
Issue Type: Bug
In the latest VSCode release (1.37.0) there seems to be a regression in markdown rendering feature, in that some of the URL parameters are incorrectly getting encoded .
Repro steps
- Create a markdown file and put following url content in it and save the file:
<!-- Begin markdown -->
[Sample Link](https://myhost.com/Redirect?url=http%3A%2F%2Fwww.bing.com%3Fsearch%3Dtom)
<!-- End markdown -->
- Click this link in markdown, see that the URL that is passed to browser is:
Notice that the %3F in the url parameter in the markdown link has been further encoded into %253F
Expected:
The URL that is passed to browser is either for the two below
- https://myhost.com/Redirect?url=http%3A%2F%2Fwww.bing.com%3Fsearch%3Dtom
- https://myhost.com/Redirect?url=http://www.bing.com?search=tom
This issue is true for other surfaces of markdown as well, like the 'Details' tab of installed extensions and the hover popup set through text decorations, via the vscode.DecorationOptions class.
This issue does not repro in older version of VSCode (1.36.0 and prior).
VS Code version: Code 1.37.1 (f06011a, 2019-08-15T16:17:55.855Z)
OS version: Windows_NT x64 10.0.18963
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz (12 x 3492) |
| GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: disabled_software oop_rasterization: disabled_off protected_video_decode: unavailable_off rasterization: enabled skia_deferred_display_list: disabled_off skia_renderer: disabled_off surface_synchronization: enabled_on video_decode: enabled viz_display_compositor: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | undefined |
| Memory (System) | 15.91GB (0.57GB free) |
| Process Argv | |
| Screen Reader | no |
| VM | 0% |
Extensions (6)
| Extension | Author (truncated) | Version |
|---|---|---|
| devinsights | Mic | 2019.1.25-6 |
| vscode-nmake-tools | Mic | 2.0.190801001 |
| cpptools | ms- | 0.24.1 |
| powershell | ms- | 2019.5.0 |
| vscode-typescript-tslint-plugin | ms- | 1.2.2 |
| debugger-for-chrome | msj | 4.11.7 |
Metadata
Metadata
Labels
*duplicateIssue identified as a duplicate of another issue(s)bugIssue identified by VS Code Team member as probable bugmarkdown-extThe Markdown extension: language features and previewuriwebviewWebview issues
Activity
rbrishabh commentedon Aug 20, 2019
Hey! I would like to take this up! Could you please help me get started by pointing me to the directory (or file) where I should be making the changes?
Thanks!
hypercubestart commentedon Aug 21, 2019
Matt Bierner (@mjbvz) pull request #79552 only fixes the hover popup, however I am not sure if preserving the query string is the best way to fix this issue
jrieken commentedon Aug 22, 2019
Sorry, this isn't a good first issue because it's a bit of a bottom-less whole.
Matt Bierner (@mjbvz) The underlying issue is that
Uri.parsedecodes its input and then re-encodes when callingtoString. That (re)encoding is needed becausetoStringis mostly used to create comparable strings for storing things in maps,toStringisn't primarily designed to create externalised uri-strings for exchange.Let's come up with a fix together. An idea that's worth exploring is to use
uri.with, e.g start with "some" uri and then transform it into the uri you want. However, that requires that you are able to break the uri into its components...add failing and ignored test for #79474
jrieken commentedon Oct 24, 2019
fixed via #83060
jrieken commentedon Oct 30, 2019
re-opened via 58479e8
jrieken commentedon Oct 30, 2019
/duplicate of #83645
Closing this as a duplicate of #83645 which is all about finding a way out of the URI nightmare.
vscodebot commentedon Oct 30, 2019
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.
Happy Coding!