-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hyperlink address in response includes trailing double quote (version 0.24.5) #816
Comments
I have just had to come off quite an embarrassing call with a supplier where I said that the URLs that their API was generating weren't working properly. It was actually this issue 😂 |
If it helps in finding what caused this bug, I first reported the "issue" to the supplier on the 8th April, so the bug was released either then or the day before |
I just spent 5 minutes making a screenshot to demonstrate this issue! I'm getting the same thing: VSCode 1.55.2 |
This has been bugging me so decided to look into it. Looks like the update to the highlight.js dependency is the culprit. There is a PR there which HTML encodes quote characters to This has then broken the regex that is used to detect URLs in the The simplest fix would be to just roll the version back, but it was probably upgraded for a reason. I don't think it will be possible to fix the regex to not include Possibly could get it to work by updating it to use a replacer function instead, which could decode the match, select non URL characters from the end of the match, strip them from the anchor href and text, then add them back in outside the anchor. I'll see if I can get a PR together at some point soon |
Just opened PR #852 |
@asmith3006 @adibradfield @thofil73 @nasypovd @SawatzkiWestfalia @johnnytemp this has been fixed in the lastest verison 0.24.6 and you can have a try, thanks @adibradfield's help |
Thank you!
I confirm that the issue is gone with latest version 0.24.6 !
Just tested it successfully.
|
Tested here too, thank you!!!! @Huachao love your work and thank you @adibradfield for sorting this particular issue. |
My JSON response contains download links for files like
{
...
"url": "https://path/to/file.ext"
}
RestClient v0.24.5 creates a hyperlink from it with the following target address:
https://path/to/file.ext"
When I click the hyperlink, it won't resolve because of the trailing double quote added by RestClient.
In v0.24.4 this worked fine. RestClient created target address as expected:
https://path/to/file.ext
The text was updated successfully, but these errors were encountered: