String scrubbedName = name;
if(scrubbedName.endsWith("s")) scrubbedName = scrubbedName.substring(0, scrubbedName.length()-1);
scrubbedName = scrubbedName.replaceAll("\u00ad", "");
String urlName = URLEncoder.encode(scrubbedName, "UTF-8");
list.appendChild(doc.makeListItem(doc.makeLink("http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?CMD=search&db=pccompound&term=" +
URLEncoder.encode("\"" + scrubbedName + "\"[CSYN]", "UTF-8"), "Search PubChem for " + scrubbedName)));
//list.appendChild(doc.makeListItem(doc.makeLink("PubChem?name=" + urlName, "Fetch structures for " + scrubbedName + " from PubChem")));
if(!cutDown) list.appendChild(doc.makeListItem(doc.makeLink("Search?query=" + urlName +
"&type=word&resultsType=snippets", "Search local by name")));
if(!cutDown) list.appendChild(doc.makeListItem(doc.makeLink("/ChemNameDict?action=stop&word=" + urlName, "Add " + scrubbedName + " as stopword")));