1ee99ce653ae839e4774120c3f3923dc129c8533 angie Fri Mar 16 14:41:14 2018 -0700 Moved jsonStringEscape inside jsonWriteString because it's silly to have to remember to call it first every time. tagStorm programs were doing their own limited escaping (double-quotes only); now they get the same escaping as everywhere else. refs MLQ #21113 diff --git src/hg/hgChooseDb/hgChooseDb.c src/hg/hgChooseDb/hgChooseDb.c index 035ecce..7db59c9 100644 --- src/hg/hgChooseDb/hgChooseDb.c +++ src/hg/hgChooseDb/hgChooseDb.c @@ -126,32 +126,30 @@ if (htmlPath != NULL) { if (fileExists(htmlPath)) readInGulp(htmlPath, &htmlString, NULL); else if ( startsWith("http://" , htmlPath) || startsWith("https://", htmlPath) || startsWith("ftp://" , htmlPath)) { struct lineFile *lf = udcWrapShortLineFile(htmlPath, NULL, 256*1024); htmlString = lineFileReadAll(lf); lineFileClose(&lf); } } if (isNotEmpty(htmlString)) { -//#*** TODO: move jsonStringEscape inside jsonWriteString - htmlString = jsonStringEscape(htmlString); jsonWriteObjectStart(cj->jw, "assemblyDescription"); jsonWriteString(cj->jw, "db", db); jsonWriteString(cj->jw, "description", htmlString); jsonWriteObjectEnd(cj->jw); } } static void doCartJson() /* Perform UI commands to update the cart and/or retrieve cart vars & metadata. */ { struct cartJson *cj = cartJsonNew(cart); cartJsonRegisterHandler(cj, "getPopularSpecies", getPopularSpecies); cartJsonRegisterHandler(cj, "getDbMenu", getDbMenu); cartJsonRegisterHandler(cj, "getDescriptionHtml", getDescriptionHtml); cartJsonExecute(cj);