Skip to content

Commit

Permalink
feat: encode url tags
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Oct 18, 2022
1 parent c6d3c1f commit acd2c8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/js/RouterHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class RouterHelper {

// Fix: separate tags by commas instead of repeating `tags`, like so: `&tags=example1&tags=example2`
if (tags != null && Array.isArray(tags) && tags.length) {
route.query.tags = tags.join('|')
route.query.tags = tags.map((tag) => encodeURI(tag)).join('|')
}

return route
Expand Down
2 changes: 1 addition & 1 deletion store/booru.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const getters = {
return []
}

return tags.split('|')
return tags.split('|').map((tag) => decodeURI(tag))
}
}

Expand Down

0 comments on commit acd2c8d

Please sign in to comment.