The bug happened because the hashtag link won't get parsed by the
extension. This is desired for mentions because you don't want to
re-notify a user if you haven't updated the text in which you notify
somebody. For hashtags this is undesired and would lead to transforming
the hashtag link into a normal link on the next edit of a post.
This adds consistency: The mention links with `@` was implemented
that way already. Instead of parsing the URL, we add some redundancy and
add another attribute: data-hashtag-id
So, what characters are valid for html attributes?
Read: https://stackoverflow.com/questions/925994/what-characters-are-allowed-in-an-html-attribute-name
Thanks to @Tirokk, who added some validations on the hahstag ids, I
think we are all set. If you try to write a hashtag with a `"` double
quotation mark for example, it gets automatically replaced with a valid
hashtag. If someone wants to send us invalid hashtag ids to the backend
directly, the regex there would filter it out.
I believe this is obsolete code. Could someone double-check?
@mattwr18 I tried to see any difference to `master` and I couldn't. Did
I miss sth.?
For context: During my work on https://github.com/Human-Connection/Human-Connection/pull/1517
the webapp was complaining about missing mutations when I changed the
dropdown.
- set items to the full list of hashtags or users to avoid unnecessarily reassigning the items variable based on suggestionType
- refactor tests to trigger onFilter, which calls filterSuggestionList, then check that it returns a maximum of 15 items both for queries and empty queries
- fix description with incorrect type(users, instead of hashtags)
- return 15 items, not 14