f70023ee5a4ff57862044bdacf0dcc7f528c5398
max
  Thu Feb 6 10:18:12 2014 -0800
the TrackCheck robot uses jTidy which is stricter than normalwebbrowsers with the W3C html syntax rules. Attributes should not
contain &, nor < or >. see http://www.w3.org/TR/2006/REC-xml11-20060816/#syntax

diff --git src/lib/htmshell.c src/lib/htmshell.c
index 626d5d2..132b763 100644
--- src/lib/htmshell.c
+++ src/lib/htmshell.c
@@ -206,32 +206,31 @@
     strSwapStrs(cleanQuote, size,"<","&lt;"  );  // '<' is not the open of a tag
     if (cgiClientBrowser(NULL,NULL,NULL) == btFF)
         strSwapStrs(cleanQuote, size,"\n","&#124;"); // FF does not support!  Use "&#124;" for '|'
                                                      // instead
     else
         strSwapStrs(cleanQuote, size,"\n","&#x0A;"); // '\n' is supported on some browsers
     }
 strSwapStrs(cleanQuote, size,"\"","&quot;"); // Shield double quotes
 strSwapStrs(cleanQuote, size,"'" ,"&#39;" ); // Shield single quotes
 
 return cleanQuote;
 }
 
 char *attributeEncode(char *str)
 {
-// encode double and single quotes in a string to be used as an element attribute
-return replaceChars(replaceChars(str, "\"", "&quot;"), "'", "&#39;");
+return htmlEncodeText(str, FALSE);
 }
 
 char *htmlWarnStartPattern()
 /* Return starting pattern for warning message. */
 {
 return "<!-- HGERROR-START -->\n";
 }
 
 char *htmlWarnEndPattern()
 /* Return ending pattern for warning message. */
 {
 return "<!-- HGERROR-END -->\n";
 }
 
 void htmlWarnBoxSetup(FILE *f)