[openstreetmap/openstreetmap-website] Restrict linkify shorthand expansion to plain text (PR #6674)

Marwin Hochfelsner notifications at github.com
Sun Jan 4 17:33:24 UTC 2026


* Define linkify link detection/expansion rules only in the Text submodule and add a test against it messing up markdown content.
  This fixes #6643 and fixes #6673.
* Split the `format_link_text` function into path- and host-related parts to address https://github.com/openstreetmap/openstreetmap-website/pull/5862#r2607094697.
* Use Structs to bundle linkify host replacement rules.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Split linkify shortening functions
  * Restrict link shorthand expansion to plain text
  * Use Structs for linkify host replacement rules
  * Add test for deactivated linkify expansion in markdown

-- File Changes --

    M lib/rich_text.rb (87)
    M test/lib/rich_text_test.rb (9)

-- Patch Links --

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

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

Message ID: <openstreetmap/openstreetmap-website/pull/6674 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260104/8b6398ea/attachment.htm>


More information about the rails-dev mailing list