This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 8f9c5e08 Show warning for bad URLs
8f9c5e08 is described below

commit 8f9c5e080d902dc97656fde78899f475c1acd08b
Author: Sebb <[email protected]>
AuthorDate: Tue Oct 8 11:37:26 2024 +0100

    Show warning for bad URLs
---
 www/roster/views/person/urls.js.rb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/www/roster/views/person/urls.js.rb 
b/www/roster/views/person/urls.js.rb
index d281a583..49ff89e7 100644
--- a/www/roster/views/person/urls.js.rb
+++ b/www/roster/views/person/urls.js.rb
@@ -36,7 +36,14 @@ class PersonUrls < Vue
             end
           else
             _ul committer.urls do |url|
-              _li {_a url, href: url}
+              if url =~ %r{^https?://}
+                _li {_a url, href: url}
+              else
+                _li.bg_warning do
+                  _ url
+                  _ ' - (invalid: must start with https?://)'
+                end
+              end
             end
           end
       end

Reply via email to