Skip to content

Commit 69a953b

Browse files
Potential fix for code scanning alert no. 51: Incomplete string escaping or encoding
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 2eea422 commit 69a953b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/web/src/composables/usePagination.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function usePagination() {
3232
if (!pagination.value) return
3333
for (const key in query) {
3434
if (key.startsWith('sort')) {
35-
const sortKey = key.replace('sort[', '').replace(']', '')
35+
const sortKey = key.replace('sort[', '').replace(/\]/g, '')
3636
const sortDirection = query[key] === 'desc' ? 'desc' : 'asc'
3737
pagination.value.sortBy = sortKey
3838
pagination.value.descending = sortDirection === 'desc'

0 commit comments

Comments
 (0)