diff --git a/templates/tag.html b/templates/tag.html index 450e993..c1d7988 100644 --- a/templates/tag.html +++ b/templates/tag.html @@ -92,11 +92,11 @@ function showList(jsonData){ showLabels.setAttribute("class","Label"); showLabels.setAttribute("style","background-color:"+jsonData["postListJson"][i]['labelColor']); showLabels.innerHTML=jsonData["postListJson"][i]['label']; - showLabels.setAttribute("href",'#'+jsonData["postListJson"][i]['label']); + showLabels.setAttribute("href",'/tag.html#'+jsonData["postListJson"][i]['label']); tagLable.appendChild(showLabels); } - if(jsonData["postListJson"][i]['label']==tag || tag==''){ + if(encodeURI(jsonData["postListJson"][i]['label'])==tag || tag==''){ let item=document.createElement("a"); item.setAttribute("class","SideNav-item d-flex flex-items-center flex-justify-between"); item.setAttribute("href",jsonData["postListJson"][i]['postUrl']);