Repository: incubator-atlas Updated Branches: refs/heads/0.8-incubating b6c8ee160 -> ece7751de
ATLAS-1813: UI to escape special characters in URL Signed-off-by: Madhan Neethiraj <[email protected]> (cherry picked from commit bbf93327bb6377793aecb4f9ede3d75e1c59b636) Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/ece7751d Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/ece7751d Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/ece7751d Branch: refs/heads/0.8-incubating Commit: ece7751ded481be49f44981f7bc80663464bae83 Parents: b6c8ee1 Author: Kalyani <[email protected]> Authored: Wed May 17 17:09:18 2017 +0530 Committer: Madhan Neethiraj <[email protected]> Committed: Wed May 17 08:47:39 2017 -0700 ---------------------------------------------------------------------- dashboardv2/public/js/utils/Utils.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/ece7751d/dashboardv2/public/js/utils/Utils.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/utils/Utils.js b/dashboardv2/public/js/utils/Utils.js index 1c76c65..e09220c 100644 --- a/dashboardv2/public/js/utils/Utils.js +++ b/dashboardv2/public/js/utils/Utils.js @@ -229,16 +229,14 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'pnotify.button if (options.urlParams) { var urlParams = "?"; _.each(options.urlParams, function(value, key, obj) { - if (value != undefined || value != null) { - value = String(value); - } - value = value || null; if (value) { + value = encodeURIComponent(String(value)); urlParams += key + "=" + value + "&"; } }); urlParams = urlParams.slice(0, -1); options.url += urlParams; + } if (options.updateTabState) { $.extend(Globals.saveApplicationState.tabState, options.updateTabState());
