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

Separate active tags by instead of &

Using `&` to separate tags in path (like
`/tags/currently&selected&tags`) may interfer with tags including `&`
character (like `black&white`). Since ` ` is replaced with `_` when
adding tag to notes, it's ideal separator because it's guaranteed that
tags are not including this character.
This commit is contained in:
bimlas
2018-04-07 15:43:06 +02:00
parent 6c542750f4
commit 68c0f210cc
2 changed files with 3 additions and 3 deletions

View File

@@ -343,7 +343,7 @@ class NoteList extends React.Component {
}
if (location.pathname.match(/\/tags/)) {
const listOfTags = params.tagname.split('&')
const listOfTags = params.tagname.split(' ')
return data.noteMap.map(note => {
return note
}).filter(note => {

View File

@@ -196,7 +196,7 @@ class SideNav extends React.Component {
if (tags === 'alltags') {
return []
}
return tags.split('&')
return tags.split(' ')
}
handleClickTagListItem (name) {
@@ -229,7 +229,7 @@ class SideNav extends React.Component {
} else {
listOfTags.push(name)
}
router.push(`/tags/${listOfTags.join('&')}`)
router.push(`/tags/${listOfTags.join(' ')}`)
}
emptyTrash (entries) {