Skip to content

Commit

Permalink
Show warning for bad URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed Oct 8, 2024
1 parent 69e03d5 commit 8f9c5e0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion www/roster/views/person/urls.js.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ def render
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
Expand Down

0 comments on commit 8f9c5e0

Please sign in to comment.