Escape link for tags

This commit is contained in:
ksami 2019-10-05 15:38:13 +08:00 committed by Sean Yesmunt
parent 0b7e4a8bb0
commit 1149d76cd5

View file

@ -15,7 +15,7 @@ type Props = {
export default function Tag(props: Props) {
const { name, onClick, type = 'link', disabled = false } = props;
const isMature = MATURE_TAGS.includes(name);
const clickProps = onClick ? { onClick } : { navigate: `/$/tags?t=${name}` };
const clickProps = onClick ? { onClick } : { navigate: encodeURIComponent(`/$/tags?t=${name}`) };
let title;
if (!onClick) {