Mike Dalessio
f952b953e6
Add test coverage for autolinking multiple URLs
2025-12-29 12:21:02 -05:00
Mike Dalessio
97d8d6a395
Add "noopener" to autolinks' rel attribute
2025-12-29 12:21:02 -05:00
Mike Dalessio
4579f7cd61
Avoid string manipulation when autolinking.
...
Instead, let's use a Loofah scrubber which will create DOM nodes
directly. This should be faster and is a tiny bit simpler, as well as
removing a potential HTML injection vector.
Also, add "noreferrer" to all `mailto:` links (already present on URLs).
2025-12-29 12:21:00 -05:00
Mike Dalessio
e0c821f69b
Autolinking is more robust
...
and handles URLs with CGI params, recognizes more (and multiple)
trailing punctuation marks including entity-encoded punctuation like
`"`.
2025-12-10 10:42:24 -05:00
Mike Dalessio
c5721b8187
Avoid unescaping characters when auto-linking
...
which could lead to Nokogiri unintentionally parsing tags from a
previously-escaped text node.
2025-12-10 10:38:43 -05:00
Jorge Manrubia
e2939e846c
Consistent verb forms
2025-06-03 02:53:03 +02:00
Mike Dalessio
1302fe9da2
Autolinking shouldn't include final punctuation.
2025-06-02 14:16:02 -04:00
Jorge Manrubia
5214a74c03
Autolink emails and URLs at rendering time
2025-06-01 22:24:24 +02:00