Use list of legal chars in URL from the WHATWG standard

Notably this excludes some ASCII chars: <>{}[]`|
See https://url.spec.whatwg.org/#url-code-points

Fixes #7095
This commit is contained in:
Kovid Goyal
2024-02-05 13:19:16 +05:30
parent 5f8e5b0a29
commit 8cc2cad4d9
11 changed files with 187 additions and 16 deletions

View File

@@ -609,13 +609,13 @@ var RefMap = map[string]string{serialize_go_dict(ref_map['ref'])}
var DocTitleMap = map[string]string{serialize_go_dict(ref_map['doc'])}
var AllowedShellIntegrationValues = []string{{ {str(sorted(allowed_shell_integration_values))[1:-1].replace("'", '"')} }}
var KittyConfigDefaults = struct {{
Term, Shell_integration, Select_by_word_characters, Shell string
Term, Shell_integration, Select_by_word_characters, Url_excluded_characters, Shell string
Wheel_scroll_multiplier int
Url_prefixes []string
}}{{
Term: "{Options.term}", Shell_integration: "{' '.join(Options.shell_integration)}", Url_prefixes: []string{{ {url_prefixes} }},
Select_by_word_characters: `{Options.select_by_word_characters}`, Wheel_scroll_multiplier: {Options.wheel_scroll_multiplier},
Shell: "{Options.shell}",
Shell: "{Options.shell}", Url_excluded_characters: "{Options.url_excluded_characters}",
}}
''' # }}}