Merge pull request #23169 from edx/ziafazal/ENT-2597

ENT-2597: Use encodeURIComponent instead of encodeURI
This commit is contained in:
Zia Fazal
2020-02-24 19:46:06 +05:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ define([
describe('MultipleEnterpriseInterface', function() {
var LEARNER_URL = '/enterprise/api/v1/enterprise-learner/?username=test-learner',
NEXT_URL = '/dashboard',
REDIRECT_URL = '/enterprise/select/active/?success_url=/dashboard';
REDIRECT_URL = '/enterprise/select/active/?success_url=%2Fdashboard';
beforeEach(function() {
// Mock the redirect call

View File

@@ -18,7 +18,7 @@
* @param {string} nextUrl The URL to redirect to after multiple enterprise selection.
*/
check: function(nextUrl) {
var redirectUrl = this.urls.multipleEnterpriseUrl + encodeURI(nextUrl);
var redirectUrl = this.urls.multipleEnterpriseUrl + encodeURIComponent(nextUrl);
var username = Utils.userFromEdxUserCookie().username;
var next = nextUrl || '/';
$.ajax({