Skip to content

Fix hashtag parsing on URLs with fragments#9221

Merged
ahukkanen merged 3 commits intodevelopfrom
fix/hashtag-url-anchor
May 13, 2022
Merged

Fix hashtag parsing on URLs with fragments#9221
ahukkanen merged 3 commits intodevelopfrom
fix/hashtag-url-anchor

Conversation

@andreslucena
Copy link
Copy Markdown
Member

🎩 What? Why?

When there's a proposal with a body with a URL with a fragment, the Hashtag parser thinks that this is hashtag and links it like that (/search?term=%23fragment). This PR fixes that.

📌 Related Issues

Testing

Create a proposal with a URL like http://www.example.org/path/#fragment

(Mind that for trying this out locally you should stop the rails' server, edit the proposal and modify the body).

📷 Screenshots

Before

image

After

image

♥️ Thank you!

@andreslucena andreslucena added module: core type: fix PRs that implement a fix for a bug labels May 3, 2022
@ahukkanen ahukkanen requested review from ahukkanen and lahdeero May 3, 2022 17:01
Copy link
Copy Markdown
Contributor

@lahdeero lahdeero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and works great!

@ahukkanen ahukkanen merged commit 36e58d1 into develop May 13, 2022
@ahukkanen ahukkanen deleted the fix/hashtag-url-anchor branch May 13, 2022 14:48
andreslucena added a commit that referenced this pull request May 18, 2022
* Fix hashtag parsing on URLs with fragments

* Fix spec
andreslucena added a commit that referenced this pull request May 19, 2022
* Fix hashtag parsing on URLs with fragments

* Fix spec
ahukkanen pushed a commit that referenced this pull request May 19, 2022
* Fix hashtag parsing on URLs with fragments

* Fix spec
andreslucena added a commit that referenced this pull request May 19, 2022
* Fix hashtag parsing on URLs with fragments

* Fix spec
eliegaboriau pushed a commit to eliegaboriau/decidim that referenced this pull request Oct 25, 2022
* Fix hashtag parsing on URLs with fragments

* Fix spec
@alecslupu alecslupu added this to the 0.27.0 milestone Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: core type: fix PRs that implement a fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Links with anchors are broken

4 participants