From 3faae0b2c2f8a26233ee1442ba04874b3406f6e9 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Mon, 11 Nov 2024 10:39:49 +0800 Subject: [PATCH] trival (#3325) ### What problem does this PR solve? ### Type of change - [x] Performance Improvement --- api/utils/web_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/utils/web_utils.py b/api/utils/web_utils.py index ce05db514..29c39601b 100644 --- a/api/utils/web_utils.py +++ b/api/utils/web_utils.py @@ -77,4 +77,4 @@ def __get_pdf_from_html( def is_valid_url(url: str) -> bool: - return bool(re.match(r"(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]", url)) + return bool(re.match(r"(https?)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]", url))