1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2025-11-06 22:44:18 -05:00

Fix ; character in URI OSC 8 payload

The special character `;` can be not URL-encoded, thus it'll add
extra parameter in the payload. Handle it joining extra parameters
with the `;` as a separator.
This commit is contained in:
Kirill Chibisov 2023-03-19 18:16:28 +03:00 committed by GitHub
parent 2377c0a728
commit 4b91a1dbe9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 31 additions and 18 deletions

View file

@ -1,10 +1,14 @@
[?2004hsh-5.1$ printf '\e]8;;https://example.com\e\\foo\e]8;;\e\\\n' printf '\e]8;;https://example.com\e\\foo\e]8;;\e\\\n'
[?2004l ]8;;https://example.com\foo]8;;\
[?2004hsh-5.1$ printf '\e]8;;https://example.com\e\\foo\e]8;;\e\\\n' printf '\e]8;;https://example.com\e\\foo\e]8;;\e\\\n'
[?2004l ]8;;https://example.com\foo]8;;\
[?2004hsh-5.1$ printf '\e]8;id=42;https://example.com\e\\bar\e]8;;\e\\\n' printf '\e]8;id=42;https://example.com\e\\bar\e]8;;\e\\\n'
[?2004l ]8;id=42;https://example.com\bar]8;;\
[?2004hsh-5.1$ printf '\e]8;id=42;https://example.com\e\\bar\e]8;;\e\\\n' printf '\e]8;id=42;https://example.com\e\\bar\e]8;;\e\\\n'
[?2004l ]8;id=42;https://example.com\bar]8;;\
[?2004hsh-5.1$ [?2004l
exit
sh-5.2$ cat alacritty? _tir  erminal/tests/ref/hyperlinks/alacritty.recording
[?2004hsh-5.1$ printf '\e]8;;https://example.com\e\\foo\e]8;;\e\\\n' printf '\e]8;;https://example.com\e\\foo\e]8;;\e\\\n'
[?2004l ]8;;https://example.com\foo]8;;\
[?2004hsh-5.1$ printf '\e]8;;https://example.com\e\\foo\e]8;;\e\\\n' printf '\e]8;;https://example.com\e\\foo\e]8;;\e\\\n'
[?2004l ]8;;https://example.com\foo]8;;\
[?2004hsh-5.1$ printf '\e]8;id=42;https://example.com\e\\bar\e]8;;\e\\\n' printf '\e]8;id=42;https://example.com\e\\bar\e]8;;\e\\\n'
[?2004l ]8;id=42;https://example.com\bar]8;;\
[?2004hsh-5.1$ printf '\e]8;id=42;https://example.com\e\\bar\e]8;;\e\\\n' printf '\e]8;id=42;https://example.com\e\\bar\e]8;;\e\\\n'
[?2004l ]8;id=42;https://example.com\bar]8;;\
[?2004hsh-5.1$ [?2004l
exit
sh-5.2$ printf '\e]8;id=hello;http://example.com/naoheu;ntahoeu\e\\This is a link\e]8;id=hello;\e\\\n'
]8;id=hello;http://example.com/naoheu;ntahoeu\This is a link]8;id=hello;\
sh-5.2$ exit

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
{"columns":157,"screen_lines":40}
{"columns":140,"screen_lines":32}