2b30b55d6a5b71648296873b570b9d68b4901b6a
galt
  Wed Feb 15 02:21:56 2017 -0800
CSP code cleanup. Using jsInlineF where needed for compact and efficient code, not using fixed-size local javascript strings which could overflow.

diff --git src/hg/hgTables/great.c src/hg/hgTables/great.c
index 7194b90..269f489 100644
--- src/hg/hgTables/great.c
+++ src/hg/hgTables/great.c
@@ -84,42 +84,40 @@
     slReverse(&supportedAssemblies);
     currAssembly = supportedAssemblies;
     struct dyString* dy = dyStringNew(0);
     addAssemblyToSupportedList(dy, currAssembly->name);
 
     currAssembly = currAssembly->next;
     while (currAssembly != NULL)
 	{
 	dyStringAppend(dy, ", ");
 	if (currAssembly->next == NULL)
 	    dyStringAppend(dy, "and ");
 	addAssemblyToSupportedList(dy, currAssembly->name);
 	currAssembly = currAssembly->next;
 	}
 
-    char javascript[1024];
-    safef(javascript, sizeof javascript,	    
+    jsInlineF(
 	"function logSpecies() {\n"
 	" try {\n"
 	"  var r = new XMLHttpRequest();\n"
 	"  r.open('GET', 'http://great.stanford.edu/public/cgi-bin/logSpecies.php?species=%s');\n"
 	"  r.send(null);\n"
 	" } catch (err) { }\n"
 	"}\n"
 	"window.onload = logSpecies;\n"
 	, database);
-    jsInline(javascript);
 
     errAbort("GREAT only supports the %s assemblies."
     "\nPlease go back and ensure that one of those assemblies is chosen.",
 	dyStringContents(dy));
     htmlClose();
 	dyStringFree(&dy);
     }
 
 slNameFreeList(&supportedAssemblies);
 }
 
 void doGreatTopLevel()
 /* intermediate page for formats printed directly from top form */
 {
 struct dyString *name = getRequestName();