src/lib/htmshell.c 1.54
1.54 2009/06/29 17:28:18 tdreszer
Newling also breaks the warnBox code. sway '\n' with '<BR>'.
Index: src/lib/htmshell.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/htmshell.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -b -B -U 4 -r1.53 -r1.54
--- src/lib/htmshell.c 26 Jun 2009 20:02:52 -0000 1.53
+++ src/lib/htmshell.c 29 Jun 2009 17:28:18 -0000 1.54
@@ -232,8 +232,10 @@
vsnprintf(warning,sizeof(warning),format, args);
// NOTE: While some internal HTML should work, a single quote (') will will screw it all up!
if( strSwapStrs(warning, sizeof(warning),"'","'") == -1) // Sheild single quotes
strSwapChar(warning,'\'','`'); // ran out of memory, replacing them with (`)
+if( strSwapStrs(warning, sizeof(warning),"\n","<BR>") == -1) // new lines also break the code
+ strSwapChar(warning,'\n',' '); // ran out of memory, replacing them with ( )
printf("<script type='text/javascript'>{var warnList=document.getElementById('warnList'); warnList.innerHTML += '<li>%s</li>'; showWarnBox();}</script>\n",warning);
#else//ifndef WARNBOX_IN_USE