Updated Branches: refs/heads/master ae3273615 -> 79410f90b
cloudstack 3.0 UI - account page - fix a bug that happens when account name includes ampersand or other special characters. Encode account name before it's being passed to API calls. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/79410f90 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/79410f90 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/79410f90 Branch: refs/heads/master Commit: 79410f90bc35a1dc8eb559236f6617c690fdd63c Parents: ae32736 Author: Jessica Wang <[email protected]> Authored: Thu Jun 21 13:02:32 2012 -0700 Committer: Jessica Wang <[email protected]> Committed: Thu Jun 21 13:02:52 2012 -0700 ---------------------------------------------------------------------- ui/scripts/accounts.js | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/79410f90/ui/scripts/accounts.js ---------------------------------------------------------------------- diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js index 3682778..6d67d7a 100644 --- a/ui/scripts/accounts.js +++ b/ui/scripts/accounts.js @@ -579,7 +579,7 @@ var accountObj = json.listaccountsresponse.account[0]; $.ajax({ - url: createURL("listResourceLimits&domainid=" + accountObj.domainid + "&account=" + accountObj.name), + url: createURL("listResourceLimits&domainid=" + accountObj.domainid + "&account=" + todb(accountObj.name)), dataType: "json", success: function(json) { var limits = json.listresourcelimitsresponse.resourcelimit; @@ -648,7 +648,7 @@ var accountObj = args.context.accounts[0]; if(isAdmin() || isDomainAdmin()) { $.ajax({ - url: createURL("listUsers&domainid=" + accountObj.domainid + "&account=" + accountObj.name + "&page=" + args.page + "&pagesize=" + pageSize + array1.join("")), + url: createURL("listUsers&domainid=" + accountObj.domainid + "&account=" + todb(accountObj.name) + "&page=" + args.page + "&pagesize=" + pageSize + array1.join("")), dataType: "json", success: function(json) { args.response.success({ @@ -748,7 +748,7 @@ array1.push("&timezone=" + todb(args.data.timezone)); array1.push("&domainid=" + accountObj.domainid); - array1.push("&account=" + accountObj.name); + array1.push("&account=" + todb(accountObj.name)); array1.push("&accounttype=" + accountObj.accounttype); $.ajax({
