af730d9e24c0642fe39657f890bc117ed015ccbf galt Wed Feb 15 01:12:26 2017 -0800 CSP code cleanup. Using new var-args versions of functions jsInlineF and jsOnEventByIdF to avoid using lots of fixed-size local javascript strings. diff --git src/hg/lib/fileUi.c src/hg/lib/fileUi.c index a730971..c8e8b29 100644 --- src/hg/lib/fileUi.c +++ src/hg/lib/fileUi.c @@ -715,34 +715,32 @@ printf("",(filterable != 0) ?" class='filterable'":""); // Download button printf(""); if (parentTdb) field = parentTdb->track; else { field = cloneString(mdbObjFindValue(oneFile->mdb,MDB_VAR_COMPOSITE)); mdbObjRemoveOneVar(oneFile->mdb,MDB_VAR_COMPOSITE,NULL); } assert(field != NULL); char id[256]; safef(id, sizeof id, "ftpBut_%d", butCount++); printf("", id, oneFile->fileName); - char javascript[1024]; - safef(javascript, sizeof javascript, "window.location='http://%s/goldenPath/%s/%s/%s%s/%s';" + jsOnEventByIdF("click", id, "window.location='http://%s/goldenPath/%s/%s/%s%s/%s';" ,server,db,ENCODE_DCC_DOWNLOADS, field, subDir, oneFile->fileName); - jsOnEventById("click", id, javascript); #define SHOW_FOLDER_FRO_COMPOSITE_DOWNLOADS #ifdef SHOW_FOLDER_FRO_COMPOSITE_DOWNLOADS if (parentTdb == NULL) printf("  ", db,field,field); #endif///def SHOW_FOLDER_FRO_COMPOSITE_DOWNLOADS printf("\n"); // Each of the pulled out mdb vars if (sortOrder) { for (ix=0;ixcount;ix++) { if (sameString("fileSize",sortOrder->column[ix]))