[openstreetmap/openstreetmap-website] Show mailto: links for an email or emails separated by ; (#2542)

Boubacar notifications at github.com
Mon Feb 17 17:01:18 UTC 2020


Resolves #1689.
This will recognize most, but not all, email values and create mailto: links for them.
This uses a regex suggested by the [W3C HTML spec](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address), which follows [RFC 1123](https://tools.ietf.org/html/rfc1123) but not [RFC 5322](https://tools.ietf.org/html/rfc5322).
A subset of valid emails containing comments, whitespace characters, and quoted strings will not be recognized and made into links.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/2542

-- Commit Summary --

  * Add  email link helper to create mailto: links for email values in objects
  * Merge branch 'master' of github.com:openstreetmap/openstreetmap-website
  * make email regex slightly more readable

-- File Changes --

    M app/helpers/browse_tags_helper.rb (29)
    M test/helpers/browse_tags_helper_test.rb (72)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/2542.patch
https://github.com/openstreetmap/openstreetmap-website/pull/2542.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2542
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200217/0b696df0/attachment.htm>


More information about the rails-dev mailing list