src/hg/near/hgNear/customColumn.c 1.8

1.8 2010/05/07 03:37:41 galt
using htmlEncode via new function hPrintEncodeNonBreak to protect against problems with <>;" in output, problem was recently uncovered by hgNearTest
Index: src/hg/near/hgNear/customColumn.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/near/hgNear/customColumn.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -b -B -U 4 -r1.7 -r1.8
--- src/hg/near/hgNear/customColumn.c	6 Mar 2006 18:09:41 -0000	1.7
+++ src/hg/near/hgNear/customColumn.c	7 May 2010 03:37:41 -0000	1.8
@@ -612,13 +612,14 @@
 	char *encoded = cgiEncode(hel->val);
         hPrintf("<A HREF=\"");
 	hPrintf(col->itemUrl, encoded);
 	hPrintf("\">");
-	hPrintNonBreak(hel->val);
+	hPrintEncodedNonBreak(hel->val);
 	hPrintf("</A>");
+	freeMem(encoded);
 	}
     else
-	hPrintNonBreak(hel->val);
+	hPrintEncodedNonBreak(hel->val);
     }
 if (!gotAny)
     {
     hPrintf("n/a");