@xterm/xterm 5.6.0-beta.15 → 5.6.0-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xterm/xterm",
3
3
  "description": "Full xterm terminal, in your browser",
4
- "version": "5.6.0-beta.15",
4
+ "version": "5.6.0-beta.16",
5
5
  "main": "lib/xterm.js",
6
6
  "style": "css/xterm.css",
7
7
  "types": "typings/xterm.d.ts",
@@ -2972,14 +2972,18 @@ export class InputHandler extends Disposable implements IInputHandler {
2972
2972
  * feedback. Use `OSC 8 ; ; BEL` to finish the current hyperlink.
2973
2973
  */
2974
2974
  public setHyperlink(data: string): boolean {
2975
- const args = data.split(';');
2976
- if (args.length < 2) {
2977
- return false;
2975
+ // Arg parsing is special cases to support unencoded semi-colons in the URIs (#4944)
2976
+ const idx = data.indexOf(';');
2977
+ if (idx === -1) {
2978
+ // malformed sequence, just return as handled
2979
+ return true;
2978
2980
  }
2979
- if (args[1]) {
2980
- return this._createHyperlink(args[0], args[1]);
2981
+ const id = data.slice(0, idx).trim();
2982
+ const uri = data.slice(idx + 1);
2983
+ if (uri) {
2984
+ return this._createHyperlink(id, uri);
2981
2985
  }
2982
- if (args[0].trim()) {
2986
+ if (id.trim()) {
2983
2987
  return false;
2984
2988
  }
2985
2989
  return this._finishHyperlink();