From da80086e48f77a82c4564d5a1157e5540cad2101 Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Sun, 6 Sep 2020 09:24:19 +0800 Subject: [PATCH] Tags can't have '#' Resolved https://github.com/logseq/logseq/issues/277 --- web/src/main/frontend/components/hiccup.cljs | 3 ++- web/src/main/frontend/util.cljs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/main/frontend/components/hiccup.cljs b/web/src/main/frontend/components/hiccup.cljs index beba9407d..75e1067c2 100644 --- a/web/src/main/frontend/components/hiccup.cljs +++ b/web/src/main/frontend/components/hiccup.cljs @@ -1351,7 +1351,8 @@ (if (= k :tags) (let [tag (-> item (string/replace "[" "") - (string/replace "]" ""))] + (string/replace "]" "") + (string/replace "#" ""))] [:a.tag.mr-1 {:href (str "/page/" tag)} tag]) [:span item])) diff --git a/web/src/main/frontend/util.cljs b/web/src/main/frontend/util.cljs index b34af985b..e537c5e0e 100644 --- a/web/src/main/frontend/util.cljs +++ b/web/src/main/frontend/util.cljs @@ -782,6 +782,7 @@ (let [tag (-> (string/trim tag) (string/lower-case) (string/replace #"\s+" "-") + (string/replace #"#" "") (string/replace "[" "") (string/replace "]" ""))] (if (tag-valid? tag)