833822ee8b1ddfa426a4af8cd83fdbaffbb55262
tdreszer
Tue Oct 25 17:25:36 2011 -0700
This should be a safe change to js and css links in the CGI ouutput. It will eliminate problems with htmlCheck linkChecker.
diff --git src/hg/lib/web.c src/hg/lib/web.c
index f8d9ecb..22e5582 100644
--- src/hg/lib/web.c
+++ src/hg/lib/web.c
@@ -1274,35 +1274,35 @@
fileName, dyStringContents(linkWithTimestamp));
// Free up all that extra memory
dyStringFree(&realFileName);
dyStringFree(&fullDirName);
char *linkFull = dyStringCannibalize(&linkWithTimestamp);
char *link = linkFull;
if (docRoot != NULL)
link = cloneString(linkFull + strlen(docRoot) + 1);
freeMem(linkFull);
if (wrapInHtml) // wrapped for christmas
{
struct dyString *wrapped = dyStringNew(0);
if (js)
- dyStringPrintf(wrapped,"\n", link);
+ dyStringPrintf(wrapped,"\n", link);
else if (style)
- dyStringPrintf(wrapped,"\n", link);
+ dyStringPrintf(wrapped,"\n", link);
else // Will be image, since these are the only three choices allowed
- dyStringPrintf(wrapped,"\n", link);
+ dyStringPrintf(wrapped,"\n", link);
freeMem(link);
link = dyStringCannibalize(&wrapped);
}
return link;
}
char *webTimeStampedLinkToResourceOnFirstCall(char *fileName, boolean wrapInHtml)
// If this is the first call, will
// Return full path of timestamped link to the requested resource file (js, or css). Free after use.
// else returns NULL. Useful to ensure multiple references to the same resource file are not made
// NOTE: png, jpg and gif should also be supported but are untested.
{
static struct hash *includedResourceFiles = NULL;
if(!includedResourceFiles)