Closed PrzemyslawKlys closed 2 years ago
@PrzemyslawKlys thanks for opening this--this is a vscode issue as they are the ones providing the dialog (we do not control the open vs copy dialog). Could you please open an issue in their repo? Thanks!
The error is because the new lines in URL are not provided when you copy the URL so it all messes up. Do you think providing new lines (for URL usage) is part of your responsibility or vscode to make sure it's properly encoded?
I think they will argue that their "option" processes it properly because it simply takes the "Text" provided and converts it into a single line.
It takes the provided text with a URL and it does what it does.
If you take your code to generate this and replace all the NewLines
with %0D%0A
it's going to work properly...
https://github.com/PowerShell/vscode-powershell/issues/new?body=Issue Description%0D%0A=====%0D%0AI am experiencing a problem with...%0D%0A%0D%0AAttached Logs%0D%0A=====%0D%0AFollow the instructions in the [README](https://github.com/PowerShell/vscode-powershell%23reporting-problems) about
capturing and sending logs.%0D%0A%0D%0AEnvironment Information%0D%0A=====%0D%0A
So maybe instead of pushing it to VSCode we could simply fix this code in VSCode-PowerShell addressing new lines with proper replacement code for the URL use?
The code for this @SydneyhSmith is located here:
So if you make it one-liner with proper replacements to newlines it should work I guess? I guess I could submit PR but I have no way to test this since I've never done the development of VSCode/TypeScript.
@PrzemyslawKlys we gave this a second look and you are correct...thanks for also grabbing the code, I am going to mark this as "Up for Grabs" but if you are interested in making the fix we can help you get set up
Do you think providing new lines (for URL usage) is part of your responsibility or vscode to make sure it's properly encoded?
I'm just looking into this quickly and we immediately pass the body string to encodeURIComponent()
. I would have expected that to do what we want. Certainly the way I'd want to implement this would be to put the body we want into a string in normal text and then use a library function to URI-escape it.
Should it be closed? Its not fixed is it?
I think the bot closed this because it's labelled Resolution-External
It's a valid issue... it's just low pri since open works.
Ditto @PrzemyslawKlys
@andschwa It's no longer valid. Since you implemented the requirement to choose Issue/new features when you create a new one in this report the function in VSCode to upload bug reports is a bit useless :-)
Yay!
Issue Description
I am experiencing a problem with... uploading bug report from VSCode. If you choose to upload report you get something like this:
Attached Logs
Follow the instructions in the README about capturing and sending logs.
Environment Information
Visual Studio Code
PowerShell Information
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
|Extension|Author|Version| |---|---|---| |auto-rename-tag|formulahendry|0.1.1| |azure-dark-theme|eddyw|0.2.0| |beautify|HookyQR|1.5.0| |bracket-pair-colorizer-2|CoenraadS|0.0.29| |code-settings-sync|Shan|3.4.3| |codesnap|adpyke|1.0.26| |dark-plus-material|vangware|2.2.2| |excel-to-markdown-table|csholmq|1.1.0| |gistfs|vsls-contrib|0.0.43| |github-linker|gimenete|0.2.3| |gitlens|eamodio|10.2.0| |html-preview-vscode|george-alisson|0.2.5| |markdown-all-in-one|yzhang|2.6.1| |markdown-preview-enhanced|shd101wyy|0.5.1| |markdown-shortcuts|mdickin|0.12.0| |material-icon-theme|PKief|3.9.2| |moonlight|atomiks|0.10.0| |nebula-theme|ChirtleLovesDolls|1.3.2| |pdf|tomoki1207|0.5.1| |powershell-preview|ms-vscode|2019.12.0| |project-manager|alefragnani|10.9.1| |reg|ionutvmi|1.0.1| |synthwave-x-fluoromachine|webrender|0.0.9| |theme-monokai-pro-vscode|monokai|1.1.14| |vscode-html-css|ecmel|0.2.3| |vscode-markdownlint|DavidAnson|0.33.0| |vscode-power-mode|hoovercj|2.2.0| |vscode-pull-request-github|GitHub|0.14.0| |vscode-wakatime|WakaTime|2.2.1| |vscode-yaml|redhat|0.6.1| |xml|DotJoshJohnson|2.5.0|