馃悰 [Bug] Hashtag links are not URL safe
Created by: Tirokk
Authored by roschaefer Closed
馃悰 Bugreport
Some of the imported hashtags contain whitespaces. If you click on one of them, you get to page /search/hashtag/#%20Appeninnen
and redirected to the index page, thus not filtering for any hashtags.
Steps to reproduce the behavior
- Write a post with a hashtag, choose an existing one with a whitespace
- Save the post
- Click on the hashtag
- Get redirected to the index page with the list of all posts unfiltered
Expected behavior
You should see a list of posts that all have been tagged with the hashtag.
Additional context
There are two things to be fixed here:
- The database import should make use of apoc.text.snakeCase() (this will be solved here #1399 )
- The unnecessary redirect should be removed. Instead, the link to the hashtag search should have safely encode the filter object as url params. This is an example of the string
# Appeninen
safely encoded:http://localhost:3000/?hashtag=#%20Appenninen