@hlfan commented on this pull request.
> @@ -88,25 +88,19 @@ def sanitize(text)
end
def linkify(text, mode = :urls)
- ERB::Util.html_escape(text)
- .then { |html| expand_link_shorthands(html) }
- .then { |html| expand_host_shorthands(html) }
- .then { |html| auto_link(html, mode) }
- .html_safe
+ link_attr = 'rel="nofollow noopener noreferrer" dir="auto"'
+ ERB::Util
+ .html_escape(text)
+ .then { |html| expand_link_shorthands(html) }
+ .then { |html| expand_host_shorthands(html) }
+ .then { |html| Rinku.auto_link(html, mode, link_attr) { |url|
shorten_link(shorten_hosts(url)) } }
Another option is to not move the path replacement definition but to make it
toggleable:
https://github.com/openstreetmap/openstreetmap-website/compare/master...hlfan:openstreetmap-website:structured-linkify
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6674#discussion_r2675354781
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6674/review/[email protected]>_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev