Unverified Commit e6df8bca authored by Michel Le Bihan's avatar Michel Le Bihan
Browse files

Change make_href_markup to not set URL color if gajim-url is not set

parent dbda5c5c
Pipeline #7303 failed with stages
in 0 seconds
......@@ -776,14 +776,17 @@ def get_thumbnail_size(pixbuf, size):
def make_href_markup(string):
url_color = app.css_config.get_value('.gajim-url', StyleAttr.COLOR)
color = convert_rgb_to_hex(url_color)
def _to_href(match):
url = match.group()
if '://' not in url:
url = 'https://' + url
return '<a href="%s"><span foreground="%s">%s</span></a>' % (
url, color, match.group())
if url_color is not None:
return '<a href="%s"><span foreground="%s">%s</span></a>' % (
url, convert_rgb_to_hex(url_color), match.group())
else:
return '<a href="%s">%s</a>' % (
url, match.group())
return URL_REGEX.sub(_to_href, string)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment