Commit b4e69c6
Add
This adds a `safeUriSchemes` global setting which lets you define
hyperlink URI schemes which the user considers safe. No confirmation
dialog will be shown when trying to open hyperlinks which use these
schemes.
- This solves the root issue, but doesn't introduce any UI or
documentation changes. I wanted to validate the approach and
implementation with you first.
- I closely followed the code handling the `disabledProfileSources`
setting, which is of the same type.
- This feature does not change the behavior of `http`, `https` and
`file` schemes.
Validation
I ran the dev terminal, and tested the behavior by clicking on `vscode`
hyperlinks generated by ripgrep with various `safeUriSchemes` settings:
- Setting not defined - asks for confirmation
- `["vscode"]` - does not ask for confirmation
- `["foo", "vscode"]` - does not ask for confirmation
- `["foo"]` - asks for confirmation
- `null` - asks for confirmation
- `[]` - asks for confirmation
- `[""]` - asks for confirmation
- `[{"foo": "bar"}]` - fails to deserialize (as expected)
A few uinit tests failed, but they seem unrelated to these changes:
- `KeyBindingTests` in `UnitTests_SettingsModel`, probably because I use
an AZERTY keyboard.
- A few `Conhost` tests, but I didn't touch this part
Refs #20065
Closes #20191
(cherry picked from commit fb71a04)
Service-Card-Id: PVTI_lADOAF3p4s4BBcTlzgshlaM
Service-Version: 1.24safeUriSchemes setting (#20207)1 parent f86f4a2 commit b4e69c6
7 files changed
Lines changed: 34 additions & 4 deletions
File tree
- doc/cascadia
- src/cascadia
- TerminalApp
- TerminalSettingsModel
- UnitTests_SettingsModel
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2462 | 2462 | | |
2463 | 2463 | | |
2464 | 2464 | | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
2465 | 2472 | | |
2466 | 2473 | | |
2467 | 2474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3144 | 3144 | | |
3145 | 3145 | | |
3146 | 3146 | | |
3147 | | - | |
| 3147 | + | |
3148 | 3148 | | |
3149 | | - | |
| 3149 | + | |
| 3150 | + | |
| 3151 | + | |
3150 | 3152 | | |
3151 | 3153 | | |
3152 | 3154 | | |
3153 | | - | |
| 3155 | + | |
3154 | 3156 | | |
3155 | 3157 | | |
3156 | 3158 | | |
| |||
3164 | 3166 | | |
3165 | 3167 | | |
3166 | 3168 | | |
| 3169 | + | |
| 3170 | + | |
| 3171 | + | |
| 3172 | + | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
| 3177 | + | |
| 3178 | + | |
3167 | 3179 | | |
3168 | 3180 | | |
3169 | 3181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
| 421 | + | |
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
105 | 113 | | |
106 | 114 | | |
107 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| 464 | + | |
464 | 465 | | |
465 | 466 | | |
466 | 467 | | |
| |||
0 commit comments