diff --git a/lms/static/js/spec/student_account/multiple_enterprise_spec.js b/lms/static/js/spec/student_account/multiple_enterprise_spec.js index 86ba7d504c..0c7d8be569 100644 --- a/lms/static/js/spec/student_account/multiple_enterprise_spec.js +++ b/lms/static/js/spec/student_account/multiple_enterprise_spec.js @@ -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 diff --git a/lms/static/js/student_account/multiple_enterprise.js b/lms/static/js/student_account/multiple_enterprise.js index 94046fdf2c..9dadd3d0a7 100644 --- a/lms/static/js/student_account/multiple_enterprise.js +++ b/lms/static/js/student_account/multiple_enterprise.js @@ -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({