42f9d011018e9b34cd8296ed8ebfb951465549c2
chmalee
  Mon Mar 3 15:49:39 2025 -0800
Fix undecoration of genome names bug, no need to undecorate genome names when doing download data in window request, make hubApi catch if the genome= argument is an assembly hub and act correctly, refs #34627

diff --git src/hg/js/utils.js src/hg/js/utils.js
index 3227988a365..6fb6a7d7919 100644
--- src/hg/js/utils.js
+++ src/hg/js/utils.js
@@ -1347,31 +1347,31 @@
     if (typeof(common) !== 'undefined' && common.hgsid !== undefined && common.hgsid !== null)
         return common.hgsid;
 
     hgsid = normed($("input#hgsid").first());
     if (hgsid)
         return hgsid.value;
 
     return "";
 }
 
 function undecoratedDb(db)
 // return the db name with any hub_id_ stripped
 {
 var retDb = db;
 if (db.startsWith("hub_")) {
-    retDb = db.split('_', 3)[2];
+    retDb = db.split('_').slice(2).join('_');
 }
 return retDb;
 }
 
 function getDb()
 {
     var db = normed($("input[name='db']").first());
     if (db)
         return db.value;
 
     db = getURLParam(window.location.href, "db");
     if (db.length > 0)
         return db;
 
     // This may be moved to 1st position as the most likely source