Closed schaffino closed 4 months ago
Before fixing this we should verify that ;
is expected to be supported when not URL encoded as %3B
@Tyriar https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#encodings states, that additional uri params may not contain :
or ;
due to its ambiguity with the sequence syntax. Thus I'd say this works as intended by the spec. And an error recovery strategy for excess parts separated by additional ;
is not defined, which makes it undefined behavior.
Cool, I suspected that might be the case. Closing as designed then
@Tyriar @jerch The parameters its referencing in the doc above is referring to the optional parameter argument of the OSC-8 hyperlink, not query parameters in the URI. It states that only id is specifically defined in the spec for this argument. My reading is that the URI can still be any string in the range 32–126. Given most other terminal emulators support this i believe this is still a bug.
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#the-escape-sequence
Without support for ; there are plenty of valid URI's that cannot be linked
@schaffino makes sense, thanks for the follow up. I read the "additional parameters" part wrong.
Eww, seems I also misread that.
Attempted a fix here: https://github.com/xtermjs/xterm.js/pull/5003
Tried this in both VSCode and Jupyterlab. It seems the OSC hyperlink integration doesn't work properly when the linked URL contains a ';'
The following submitted to terminator terminal emulator results in a link directing me to https://www.example.com/query;arg=1;arg=2;arg=3
printf '\e]8;;https://www.example.com/query;arg=1;arg=2;arg=3\e\\This is a link\e]8;;\e\\n'
Running the same in jupyter or VSCode, I end up being redirected to https://www.example.com/query, with the arguments truncated
Details
Steps to reproduce