fix: Allow anchors in link url
All checks were successful
Build Docker / Build Main Image (push) Successful in 19s
All checks were successful
Build Docker / Build Main Image (push) Successful in 19s
This commit is contained in:
parent
b5af7e2583
commit
59e6ed2f0a
2
main.py
2
main.py
@ -113,7 +113,7 @@ def add_link():
|
|||||||
if not (url.startswith('http://') or url.startswith('https://')):
|
if not (url.startswith('http://') or url.startswith('https://')):
|
||||||
url = 'https://' + url
|
url = 'https://' + url
|
||||||
|
|
||||||
regexmatch = re.match(r"^https?://([a-z0-9]+(-[a-z0-9]+)*\.)*([a-z0-9]+(-[a-z0-9]+)*)(/([a-z0-9.])+(-([a-z0-9.])+)?)*$", url)
|
regexmatch = re.match(r"^https?://([a-z0-9]+(-[a-z0-9]+)*\.)*([a-z0-9]+(-[a-z0-9]+)*)(/([a-z0-9.#])+(-([a-z0-9.])+)?)*$", url)
|
||||||
if not regexmatch:
|
if not regexmatch:
|
||||||
return error('Invalid domain')
|
return error('Invalid domain')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user