From 074500de7bf638fdf66f3874b80df9e87d58a746 Mon Sep 17 00:00:00 2001 From: Boris Sekachev <40690378+bsekachev@users.noreply.github.com> Date: Wed, 19 Jun 2019 17:37:25 +0300 Subject: [PATCH] Fixed dump for case when task name has a slash (#503) --- CHANGELOG.md | 1 + cvat/apps/engine/static/engine/js/base.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 610bdc35..20d0851f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed incorrect width of shapes borders in some cases - Fixed annotation parser for tracks with a start frame less than the first segment frame - Fixed interpolation on the server near outside frames +- Fixed dump for case when task name has a slash ### Security - diff --git a/cvat/apps/engine/static/engine/js/base.js b/cvat/apps/engine/static/engine/js/base.js index 21f0452a..725ac4ab 100644 --- a/cvat/apps/engine/static/engine/js/base.js +++ b/cvat/apps/engine/static/engine/js/base.js @@ -128,6 +128,9 @@ function showOverlay(message) { } async function dumpAnnotationRequest(tid, taskName) { + // URL Router on the server doesn't work correctly with slashes. + // So, we have to replace them on the client side + taskName = taskName.replace(/\//g, '_'); const name = encodeURIComponent(`${tid}_${taskName}`); return new Promise((resolve, reject) => { const url = `/api/v1/tasks/${tid}/annotations/${name}`;