diff --git a/packages/@vuepress/theme-default/components/AlgoliaSearchBox.vue b/packages/@vuepress/theme-default/components/AlgoliaSearchBox.vue index 4d51a717cb..7b2a5807cf 100644 --- a/packages/@vuepress/theme-default/components/AlgoliaSearchBox.vue +++ b/packages/@vuepress/theme-default/components/AlgoliaSearchBox.vue @@ -59,7 +59,8 @@ export default { handleSelected: (input, event, suggestion) => { const { pathname, hash } = new URL(suggestion.url) const routepath = pathname.replace(this.$site.base, '/') - this.$router.push(`${routepath}${hash}`) + const _hash = decodeURIComponent(hash) + this.$router.push(`${routepath}${_hash}`) } } ))