Metadecidim
Sign in

Process

Report a Bug

finished not yet on protocol

Linking to other modules than proposals in comments always leads to proposal links

Currently the proposal parser for comments always assumes the URLs formatted as the proposal URLs are links to proposals:
https://github.com/decidim/decidim/blob/master/decidim-proposals/lib/decidim/content_parsers/proposal_parser.rb

This will for example match the following URLs:
https://decidim.lvh.me/processes/example/f/1/proposals/123
https://decidim.lvh.me/processes/example/f/1/plans/123
https://decidim.lvh.me/processes/example/f/1/whatever-here/123

As you see from the URLs, the items can also be something else than proposals, even though they may have same IDs as proposals (as they are completely separate entities).

This parser should consider that there may be other components that have URLs of similar structure. In such case, the parser makes it impossible to link to any other resources that have same primary IDs as existing proposals.

2 comments

  1. Pull request:
    https://github.com/decidim/decidim/pull/4978

    0 votes up 0 votes down
    1. Thanks for your PR @ah!

      0 votes up 0 votes down

Sign in with your Atmosphere account to comment.