From 072ed80ca609eb2f244b2ed057015cb34f4ffa26 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 27 Jun 2023 16:12:43 +0200 Subject: [PATCH] migrate.js: Decode urls prior comparison with migration results The latter is now always decoded, since #787 --- public/js/migrate.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/js/migrate.js b/public/js/migrate.js index 5a00dbee1..0a23badda 100644 --- a/public/js/migrate.js +++ b/public/js/migrate.js @@ -117,7 +117,7 @@ $target.each((_, container) => { let $container = $(container); - let href = $container.data('icingaUrl'); + let href = decodeURI($container.data('icingaUrl')); let containerId = $container.attr('id'); if (!! href) { @@ -180,12 +180,12 @@ var containerUrl = ''; if ($container.length) { - containerUrl = $container.data('icingaUrl'); + containerUrl = decodeURI($container.data('icingaUrl')); } if (suggestionUrl !== containerUrl) { var $newContainer = $('#main > .container').filter(function () { - return $(this).data('icingaUrl') === suggestionUrl; + return decodeURI($(this).data('icingaUrl')) === suggestionUrl; }); if ($newContainer.length) { // Container moved @@ -224,7 +224,7 @@ var $button = $(event.target).closest('button'); var $suggestion = $button.parent(); var $container = $('#' + $suggestion.data('containerId')); - var containerUrl = $container.data('icingaUrl'); + var containerUrl = decodeURI($container.data('icingaUrl')); if ($button.attr('value') === '1') { // Yes @@ -474,7 +474,7 @@ this.Popup().find('li').each(function () { var $suggestion = $(this); var $container = $('#' + $suggestion.data('containerId')); - var containerUrl = $container.data('icingaUrl'); + var containerUrl = decodeURI($container.data('icingaUrl')); if ( // Unknown url, yet typeof _this.knownMigrations[containerUrl] === 'undefined'