@nertc commented on this pull request.


> +
+  validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :message => 
:http_parse_error }
+
+  URL_PATTERNS = {
+    :discord => %r{\Ahttps?://(?:www\.)?discord\.com/users/(\d+)},
+    :facebook => %r{\Ahttps?://(?:www\.)?facebook\.com/([a-zA-Z0-9.]+)},
+    :github => %r{\Ahttps?://(?:www\.)?github\.com/([a-zA-Z0-9_-]+)},
+    :gitlab => %r{\Ahttps?://(?:www\.)?gitlab\.com/([a-zA-Z0-9_-]+)},
+    :instagram => %r{\Ahttps?://(?:www\.)?instagram\.com/([a-zA-Z0-9._]+)},
+    :linkedin => %r{\Ahttps?://(?:www\.)?linkedin\.com/in/([a-zA-Z0-9_-]+)},
+    :line => %r{\Ahttps?://(?:www\.)?line\.me/ti/p/([a-zA-Z0-9_-]+)},
+    :mastodon => 
%r{\Ahttps?://(?:www\.)?(?:mastodon\.social|en\.osm\.town)/@([a-zA-Z0-9_]+)},
+    :medium => %r{\Ahttps?://(?:www\.)?medium\.com/@([a-zA-Z0-9_]+)},
+    :quora => %r{\Ahttps?://(?:www\.)?quora\.com/profile/([a-zA-Z0-9_-]+)},
+    :reddit => %r{\Ahttps?://(?:www\.)?reddit\.com/user/([a-zA-Z0-9_-]+)},
+    :skype => 
%r{\Ahttps?://(?:www\.)?join\.skype\.com/invite/([a-zA-Z0-9_-]+)},

`www.` was removed from Skype, Slack and WhatsApp invitation links (all three 
of them were broken if they were used with `www.`). As I checked, `en.osm.town` 
was also broken with `www.` and, therefore, Mastodon regex was changed to 
handle that situation accordingly. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5439#discussion_r1962976996
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/5439/review/2628900...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to