json links ending with ) wrong
Categories
(DevTools :: JSON Viewer, defect, P2)
Tracking
(Not tracked)
People
(Reporter: richard, Unassigned)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0
Steps to reproduce:
When a REST server returns json with links in it, normally you can click on a link and a new tab will open with that link.
For example go to:
https://airquality-frost.k8s.ilt-dmz.iosb.fraunhofer.de/v1.1/Things?$top=1
Click on
https://airquality-frost.k8s.ilt-dmz.iosb.fraunhofer.de/v1.1/Things(1)/Locations
working great
Actual results:
NOW click on @iot.selfLink which is a link like
https://airquality-frost.k8s.ilt-dmz.iosb.fraunhofer.de/v1.1/Things(1)
You will see that (BOTH clicking AND copying it) will bring you to:
https://airquality-frost.k8s.ilt-dmz.iosb.fraunhofer.de/v1.1/Things(1
(NOTE THE MISSING ) ON THE END)
(which then gives a 404 because the url is broken)
Expected results:
Clicking or Copying should take the last ) into consideration.
Apparently it is dropped?
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•3 years ago
|
Comment 2•3 years ago
|
||
I cannot reproduce this. Copying and clicking work as expected.
Do you have any WebExtenson installed?
Reporter | ||
Comment 3•3 years ago
|
||
Yes, I had some plugins/extensions, but even if I move my .mozilla folder (which for what I know have all plugins/extensions?) and start with a 'fresh' profile, I have the issue.
(see this screenshot: also the tooltip is missing the ending bracket)
Reporter | ||
Comment 4•3 years ago
|
||
Note: I run Debian Testing (Gnome on X.org), FIrefox version 102.2.0esr (64-bit)
But (see screenie) I'm also able to reproduce it on a Windows10 VM machine running Firefox in a relatively fresh profile, which runs: 104.0.2 (64-bit)
Comment 5•3 years ago
|
||
With your last comments, I understood what you meant and I am able to reproduce it.
This looks like a bug in our JSON parsing code.
Honza, is your team responsible for this code.
Comment 6•3 years ago
|
||
Thank you Dragana, yes, this is DevTools bug
Nicolas, it looks like this line is causing the problem:
https://searchfox.org/mozilla-central/rev/9769b513e38ee4f5df9d5d1eff55ff7cdc8cbf81/devtools/client/shared/components/reps/reps/string.js#249
Blame is showing that this line has been modified by bug: Bug 1669956 - Un-bundle reps
which is just unbundling so likely not the culprit
Similar logic is also used in messages.js file. And blame points to this bug: Bug 1545888 - Use template-styled message with placeholders as group header
Perhaps it might be more helpful.
Any tips how we could fix this?
Honza
Updated•3 years ago
|
Updated•3 years ago
|
Comment 8•3 years ago
|
||
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #6)
Thank you Dragana, yes, this is DevTools bug
Nicolas, it looks like this line is causing the problem:
https://searchfox.org/mozilla-central/rev/9769b513e38ee4f5df9d5d1eff55ff7cdc8cbf81/devtools/client/shared/components/reps/reps/string.js#249Blame is showing that this line has been modified by bug: Bug 1669956 - Un-bundle reps
which is just unbundling so likely not the culpritSimilar logic is also used in messages.js file. And blame points to this bug: Bug 1545888 - Use template-styled message with placeholders as group header
Perhaps it might be more helpful.Any tips how we could fix this?
Honza
Oriol did some analysis in https://bugzilla.mozilla.org/show_bug.cgi?id=1735545#c2 , the issue is in our code to remove some characters from the URL, so we do linkify the right part in case like there's an issue (see www.bugzilla.com)
, where we don't want the closing paren to be part of the URL.
We could try to be smarter and not remove such character if there's another "unclosed" pair character (so (
, [
, "
, '
, ...), but I don't think we'll ever get something bulletproof
Description
•