~sircmpwn/sr.ht-dev

core.sr.ht: Allow gemini and gopher URIs on profile v1 APPLIED

~alva: 1
 Allow gemini and gopher URIs on profile

 1 files changed, 2 insertions(+), 1 deletions(-)
#334951 alpine.yml success
#334952 archlinux.yml success
#334953 debian.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/14726/mbox | git am -3
Learn more about email & git
View this thread in the archives

[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
builds.sr.ht
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