diff options
| author | rr- | 2016-09-04 01:25:19 +0200 |
|---|---|---|
| committer | rr- | 2016-09-04 02:07:22 +0200 |
| commit | 7fa8593b0ab688e720c553c47a79065d6c653091 (patch) | |
| tree | f23e7edd5aedc29f7264f609c59e194ca760a573 /client/js/models/snapshot_list.js | |
| parent | a22fe306d112707fe024da2e7788aef7566e7773 (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.js | 2 |
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 => { |