remove url replacement

This commit is contained in:
Mathias DUPEUX 2025-04-15 14:39:07 +02:00
parent 1bc6d09835
commit 15515f1bc2

View file

@ -38,14 +38,6 @@ def convert_slack_references(text):
result = re.sub(channel_pattern, channel_replacement, text) result = re.sub(channel_pattern, channel_replacement, text)
url_pattern = r'<(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*))>'
def url_replacement(match):
url = match.group(1)
return f'<a target="_blank" href="{url}">{url}</a>'
result = re.sub(url_pattern, url_replacement, text)
return result return result
@sp_routes.route("/scrapbook") @sp_routes.route("/scrapbook")