Hi Sam,
This patch fixes XHTML validation bugs at "Folder" page.
I've added googled lines [1] which protect JavaScript code
from processing by the XHTML validator:
--- courier-0.53.2.20060702/webmail/folder.c-orig 2006-07-05 13:20:02.000000000
+0200
+++ courier-0.53.2.20060702/webmail/folder.c 2006-07-07 15:12:27.000000000 +0200
@@ -537,19 +537,23 @@
puts("<td colspan=\"5\">");
puts("<script type=\"text/javascript\">");
+ puts("/* <![CDATA[ */");
puts("function setAll(input, chk) {");
printf("for (i = %ld; i <= %ld; i++) {\n",
(long)pos, highend);
puts("if (document.getElementById) e = document.getElementById('MOVE-' +
i);");
puts("else if (document.all) e = document['MOVE-' + i];");
puts("if (e != null) { e.checked = chk; e.onchange(); }} }");
+ puts("/* ]]> */");
puts("</script>\n");
puts("<script type=\"text/javascript\">");
+ puts("/* <![CDATA[ */");
printf("document.write('<button type=\"button\" onclick=\"setAll(this, true);
return false;\">%s<\\/button>\\n ');\n",
selectalllab);
printf("document.write('<button type=\"button\" onclick=\"setAll(this,
false); return false;\">%s<\\/button>\\n');\n",
unselectalllab);
+ puts("/* ]]> */");
puts("</script>\n");
printf("<noscript><label><input type=\"checkbox\" name=\"SELECTALL\"
/> %s</label></noscript>\n",
@@ -630,6 +634,7 @@
puts("</td></tr></table>");
puts("<script type=\"text/javascript\">");
+ puts("/* <![CDATA[ */");
puts("document.write('<\\/td><td align=\"center\">' +");
puts("'<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"
class=\"folder-jumpto-field\"><tr><td>' +");
@@ -637,7 +642,9 @@
jumplab, (long)(pos+1));
printf("'<button type=\"button\"
onclick=\"this.form.submit();\">%s<\\/button>' +\n",
golab);
- puts("'<\\/td><\\/tr><\\/table>');\n</script>");
+ puts("'<\\/td><\\/tr><\\/table>');");
+ puts("/* ]]> */");
+ puts("</script>");
}
printf("</td><td align=\"right\">\n");
My best regards,
[1] http://javascript.about.com/library/blxhtml.htm