8874962e1a829a6830b773a572c14845fa7a9c12
chmalee
  Fri Jan 20 15:11:22 2023 -0800
Encode user's hubUrl on the hub development tab, refs #30525,#30492

diff --git src/hg/js/hgHubConnect.js src/hg/js/hgHubConnect.js
index a3e7bd3..5a9bd34 100644
--- src/hg/js/hgHubConnect.js
+++ src/hg/js/hgHubConnect.js
@@ -17,31 +17,31 @@
     var waitUrl =  myUrl + '?hgsid=' + hgsid + '&hgHub_do_hubCheck=1';
     var node = document.createElement('iframe'); 
     node.setAttribute('src', waitUrl);
     node.setAttribute('width', document.documentElement.clientWidth-100+'px');
     node.setAttribute('height', document.documentElement.clientHeight-100+'px');
     node.style.position = 'absolute'; 
     node.style.top = '50px'; 
     node.style.left = '50px'; 
     node.style.border = '3px solid darkgrey'; 
     node.id = 'checkerFrame';
     // first show the loading page
     document.body.appendChild(node);
 
 
     // when the waiting page has finished loading, load the hub checker page
-    var finalUrl = waitUrl + '&validateHubUrl='+hubUrl;
+    var finalUrl = waitUrl + '&validateHubUrl='+encodeURIComponent(hubUrl);
     var alreadyRun = false;
     node.addEventListener("load", function() {
         if (! alreadyRun)
             node.setAttribute('src', finalUrl);
         alreadyRun = true; // because 'load' fires again when finalUrl is loaded
         this.contentWindow.focus(); // activate keyboard event handlers of the iframe
     });
     return false;
 }
 
 function closeIframe() {
     var theFrame = window.parent.document.getElementById('checkerFrame');
     theFrame.parentNode.removeChild(theFrame);
 }