diff --git a/deluge/common.py b/deluge/common.py index c92a5f1d5d..80448c550c 100644 --- a/deluge/common.py +++ b/deluge/common.py @@ -720,16 +720,9 @@ def parse_human_size(size): raise InvalidSize(msg % (size, tokens)) -def wrap_url_with_html(text): +def anchorify_urls(text: str) -> str: """ - A simple regex sub to wrap all occurrences of URLs with HTML - - Args: - text (str): The string to replace urls in. - - Returns: - str: string with urls formatted as links (html). - + Wrap all occurrences of text URLs with HTML """ url_pattern = r'((htt)|(ft)|(ud))ps?://\S+' html_href_pattern = r'\g<0>'