mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-06 09:51:24 +00:00
Use native escaping for hashtag URL
This commit is contained in:
parent
34739f2cce
commit
f69352fe56
|
@ -77,6 +77,10 @@ export const HashtagMenuController: React.FC = () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hashtagUrl = new URL('/filters', document.location)
|
||||||
|
hashtagUrl.searchParams.set('custom_filter[keywords_attributes][0][keyword]', target.text)
|
||||||
|
hashtagUrl.searchParams.set('custom_filter[keywords_attributes][0][whole_word]', 1)
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
targetRef.current = target;
|
targetRef.current = target;
|
||||||
|
@ -116,7 +120,7 @@ export const HashtagMenuController: React.FC = () => {
|
||||||
text: intl.formatMessage(messages.muteHashtag, {
|
text: intl.formatMessage(messages.muteHashtag, {
|
||||||
hashtag,
|
hashtag,
|
||||||
}),
|
}),
|
||||||
href: `/filters?custom_filter[keywords_attributes][0][keyword]=%23${hashtag}&custom_filter[keywords_attributes][0][whole_word]=1`,
|
href: hashtagUrl.toString(),
|
||||||
dangerous: true,
|
dangerous: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user