Skip to content

URLs are opened incorrectly when ending with a closing parenthesis  #3688

@sd-trailhead-james

Description

@sd-trailhead-james

Describe the bug
If a URL ends with a closing parenthesis ()), Kitty seems to drop the closing parenthesis when opening the URL

To Reproduce
Steps to reproduce the behavior:

  1. Place a URL ending with a closing parenthesis ()) somewhere within Kitty
  2. Attempt to open the URL in the registered browser/handler
  3. Notice that the closing parenthesis ()) is left off of the URL when opened

Example URL: https://www.google.com/search?q=(example)

Screenshots
n/a

Environment details
OS: macOS 11.4 (Big Sur)

Output of kitty --debug-config:

kitty 0.20.3 created by Kovid Goyal
Darwin <REDACTED>.com 20.5.0 Darwin Kernel Version 20.5.0: Sat May  8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64
ProductName:	macOS ProductVersion:	11.4 BuildVersion:	20F71
Loaded config files: ~/.config/kitty/kitty.conf

Config options different from defaults:
active_border_color                Color(red=150, green=152, blue=150)
active_tab_background              Color(red=29, green=31, blue=33)
active_tab_foreground              Color(red=197, green=200, blue=198)
allow_remote_control               y
background                         Color(red=29, green=31, blue=33)
color0                             Color(red=29, green=31, blue=33)
color1                             Color(red=204, green=102, blue=102)
color10                            Color(red=40, green=42, blue=46)
color11                            Color(red=55, green=59, blue=65)
color12                            Color(red=180, green=183, blue=180)
color13                            Color(red=224, green=224, blue=224)
color14                            Color(red=163, green=104, blue=90)
color2                             Color(red=181, green=189, blue=104)
color3                             Color(red=240, green=198, blue=116)
color4                             Color(red=129, green=162, blue=190)
color5                             Color(red=178, green=148, blue=187)
color6                             Color(red=138, green=190, blue=183)
color7                             Color(red=197, green=200, blue=198)
color8                             Color(red=150, green=152, blue=150)
color9                             Color(red=222, green=147, blue=95)
cursor                             Color(red=197, green=200, blue=198)
enable_audio_bell                  False
font_family                        mononoki
font_size                          16.0
foreground                         Color(red=197, green=200, blue=198)
inactive_border_color              Color(red=40, green=42, blue=46)
inactive_tab_background            Color(red=40, green=42, blue=46)
inactive_tab_foreground            Color(red=180, green=183, blue=180)
macos_custom_beam_cursor           True
macos_quit_when_last_window_closed True
scrollback_lines                   200000
selection_background               Color(red=197, green=200, blue=198)
selection_foreground               Color(red=29, green=31, blue=33)
tab_bar_background                 Color(red=40, green=42, blue=46)
url_color                          Color(red=180, green=183, blue=180)
Added shortcuts:
	 alt+b KeyAction(func='send_text', args=['all', b'\x1bb'])
	 alt+d KeyAction(func='send_text', args=['all', b'\x1bd'])
	 alt+f KeyAction(func='send_text', args=['all', b'\x1bf'])
	 alt+h KeyAction(func='send_text', args=['all', b'\x1bh'])
	 alt+j KeyAction(func='send_text', args=['all', b'\x1bj'])
	 alt+k KeyAction(func='send_text', args=['all', b'\x1bk'])
	 alt+l KeyAction(func='send_text', args=['all', b'\x1bl'])
	 cmd+. KeyAction(func='send_text', args=['all', b'\x03'])

Additional context

Try to reproduce the problem with kitty --config NONE if you cannot then post a minimal kitty.conf that reproduces the problem. If the problem involves interaction with some other terminal program post a minimal config for that program to reproduce the problem as well.

Confirmed that the behavior is identical with kitty --config NONE

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions