aboutsummaryrefslogtreecommitdiff
path: root/client/js/models/snapshot_list.js
diff options
context:
space:
mode:
authorrr-2016-09-04 01:25:19 +0200
committerrr-2016-09-04 02:07:22 +0200
commit7fa8593b0ab688e720c553c47a79065d6c653091 (patch)
treef23e7edd5aedc29f7264f609c59e194ca760a573 /client/js/models/snapshot_list.js
parenta22fe306d112707fe024da2e7788aef7566e7773 (diff)
client/general: improve URL escaping
Specifically, cater for /, + and % in URL components.
Diffstat (limited to 'client/js/models/snapshot_list.js')
-rw-r--r--client/js/models/snapshot_list.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/js/models/snapshot_list.js b/client/js/models/snapshot_list.js
index 628ee29..22348f4 100644
--- a/client/js/models/snapshot_list.js
+++ b/client/js/models/snapshot_list.js
@@ -7,7 +7,7 @@ const Snapshot = require('./snapshot.js');
class SnapshotList extends AbstractList {
static search(text, page, pageSize) {
const url =
- `/snapshots/?query=${text}` +
+ `/snapshots/?query=${encodeURIComponent(text)}` +
`&page=${page}` +
`&pageSize=${pageSize}`;
return api.get(url).then(response => {

© 2015 - 2026 Jakob L. Kreuze