Fix patterns for url matching to handle IPv6 as host

This commit is contained in:
Stephen Boddy 2017-02-18 21:31:52 +01:00
parent 31c3b2e9f4
commit e88f3b2140

View File

@ -259,7 +259,7 @@ class Terminal(Gtk.VBox):
"""Update the regexps used to match URLs"""
userchars = "-A-Za-z0-9"
passchars = "-A-Za-z0-9,?;.:/!%$^*&~\"#'"
hostchars = "-A-Za-z0-9"
hostchars = "-A-Za-z0-9:\[\]"
pathchars = "-A-Za-z0-9_$.+!*(),;:@&=?/~#%'"
schemes = "(news:|telnet:|nntp:|file:/|https?:|ftps?:|webcal:)"
user = "[" + userchars + "]+(:[" + passchars + "]+)?"