1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +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/)) { if (location.pathname.match(/\/tags/)) {
const listOfTags = params.tagname.split('&') const listOfTags = params.tagname.split(' ')
return data.noteMap.map(note => { return data.noteMap.map(note => {
return note return note
}).filter(note => { }).filter(note => {

View File

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