1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

fixing bug #2321 due to the unescaped characters # or ? in the route

This commit is contained in:
Baptiste Augrain
2018-08-24 23:48:26 +02:00
parent 039f73711a
commit 5c8254a9c4

View File

@@ -198,12 +198,12 @@ class SideNav extends React.Component {
const tags = pathSegments[pathSegments.length - 1]
return (tags === 'alltags')
? []
: tags.split(' ')
: tags.split(' ').map(tag => decodeURIComponent(tag))
}
handleClickTagListItem (name) {
const { router } = this.context
router.push(`/tags/${name}`)
router.push(`/tags/${encodeURIComponent(name)}`)
}
handleSortTagsByChange (e) {
@@ -230,7 +230,7 @@ class SideNav extends React.Component {
} else {
listOfTags.push(tag)
}
router.push(`/tags/${listOfTags.join(' ')}`)
router.push(`/tags/${listOfTags.map(tag => encodeURIComponent(tag)).join(' ')}`)
}
emptyTrash (entries) {