Skip to content

Commit f41b072

Browse files
authored
Encode worker and task names in URL (#1204)
This addresses a bug where worker or task names that contain characters that should be URL encoded cannot be navigated to in the UI.
1 parent 95bd80b commit f41b072

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flower/static/js/flower.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ var flower = (function () {
468468
data: 'hostname',
469469
type: 'natural',
470470
render: function (data, type, full, meta) {
471-
return '<a href="' + url_prefix() + '/worker/' + data + '">' + data + '</a>';
471+
return '<a href="' + url_prefix() + '/worker/' + encodeURIComponent(data) + '">' + data + '</a>';
472472
}
473473
}, {
474474
targets: 1,
@@ -559,7 +559,7 @@ var flower = (function () {
559559
visible: isColumnVisible('uuid'),
560560
orderable: false,
561561
render: function (data, type, full, meta) {
562-
return '<a href="' + url_prefix() + '/task/' + data + '">' + data + '</a>';
562+
return '<a href="' + url_prefix() + '/task/' + encodeURIComponent(data) + '">' + data + '</a>';
563563
}
564564
}, {
565565
targets: 2,
@@ -623,7 +623,7 @@ var flower = (function () {
623623
data: 'worker',
624624
visible: isColumnVisible('worker'),
625625
render: function (data, type, full, meta) {
626-
return '<a href="' + url_prefix() + '/worker/' + data + '">' + data + '</a>';
626+
return '<a href="' + url_prefix() + '/worker/' + encodeURIComponent(data) + '">' + data + '</a>';
627627
}
628628
}, {
629629
targets: 10,

0 commit comments

Comments
 (0)