@pablobm commented on this pull request.
> @@ -31,7 +31,7 @@ class SocialLink < ApplicationRecord
:flickr => %r{\Ahttps?://(?:www\.)?flickr\.com/people/([a-zA-Z0-9@._-]+)},
:github => %r{\Ahttps?://(?:www\.)?github\.com/([a-zA-Z0-9_-]+)},
:gitlab => %r{\Ahttps?://(?:www\.)?gitlab\.com/([a-zA-Z0-9_-]+)},
- :hdyc => %r{\Ahttps?://(?:www\.)?hdyc\.neis-one\.org/\?([a-zA-Z0-9_-]+)},
+ :hdyc =>
%r{\Ahttps?://(?:www\.)?hdyc\.neis-one\.org/\?([a-zA-Z0-9\s%20_-]+)},
Also, generally on regular expressions: "character classes" (lists of
characters surrounded by square brackets `[...]`) take each character
individually, so `%20` is `%`, `2`, or `0` individually, but not the three
together. The `\s` does work because `\` is a escape character a special case.
`%` is a escape character in URLs, but not in regular expressions.
This is a great website to test out regular expressions: https://rubular.com/
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6468#discussion_r2459589156
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6468/review/[email protected]>_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev