[PATCH core.sr.ht] Allow gemini and gopher URIs on profile
Export this patch
From: Alva <a@u8.is>
---
srht/validation.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/srht/validation.py b/srht/validation.py
index 5ff98cf..b42c8ef 100644
--- a/srht/validation.py
+++ b/srht/validation.py
@@ -152,8 +152,9 @@ class Validation:
return value in self.source or value in self.files
def valid_url(url):
+ allowed_schemes = ('http', 'https', 'gemini', 'gopher')
try:
u = parse.urlparse(url)
- return bool(u.scheme and u.netloc and u.scheme in ['http', 'https'])
+ return bool(u.scheme and u.netloc and u.scheme in allowed_schemes)
except:
return False
--
2.26.2
core.sr.ht/patches: SUCCESS in 4m26s
[Allow gemini and gopher URIs on profile][0] from [~alva][1]
[0]: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/14726
[1]: mailto:a@u8.is
✓ #334951 SUCCESS core.sr.ht/patches/alpine.yml https://builds.sr.ht/~sircmpwn/job/334951
✓ #334953 SUCCESS core.sr.ht/patches/debian.yml https://builds.sr.ht/~sircmpwn/job/334953
✓ #334952 SUCCESS core.sr.ht/patches/archlinux.yml https://builds.sr.ht/~sircmpwn/job/334952
Thanks!
To git@git.sr.ht:~sircmpwn/core.sr.ht
8bedd6a..028eea9 master -> master