Skip to content

Commit

Permalink
Encode worker and task names in URL (#1204)
Browse files Browse the repository at this point in the history
This addresses a bug where worker or task names that contain characters
that should be URL encoded cannot be navigated to in the UI.
  • Loading branch information
robyoung authored May 21, 2022
1 parent 95bd80b commit f41b072
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flower/static/js/flower.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ var flower = (function () {
data: 'hostname',
type: 'natural',
render: function (data, type, full, meta) {
return '<a href="' + url_prefix() + '/worker/' + data + '">' + data + '</a>';
return '<a href="' + url_prefix() + '/worker/' + encodeURIComponent(data) + '">' + data + '</a>';
}
}, {
targets: 1,
Expand Down Expand Up @@ -559,7 +559,7 @@ var flower = (function () {
visible: isColumnVisible('uuid'),
orderable: false,
render: function (data, type, full, meta) {
return '<a href="' + url_prefix() + '/task/' + data + '">' + data + '</a>';
return '<a href="' + url_prefix() + '/task/' + encodeURIComponent(data) + '">' + data + '</a>';
}
}, {
targets: 2,
Expand Down Expand Up @@ -623,7 +623,7 @@ var flower = (function () {
data: 'worker',
visible: isColumnVisible('worker'),
render: function (data, type, full, meta) {
return '<a href="' + url_prefix() + '/worker/' + data + '">' + data + '</a>';
return '<a href="' + url_prefix() + '/worker/' + encodeURIComponent(data) + '">' + data + '</a>';
}
}, {
targets: 10,
Expand Down

0 comments on commit f41b072

Please sign in to comment.