1 message in net.sourceforge.lists.courier-sqwebmail[sqwebmail] XHTML validation: "Folder...
FromSent OnAttachments
Pawel TeczaJul 7, 2006 6:31 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[sqwebmail] XHTML validation: "Folder" pageActions...
From:Pawel Tecza (p.te@net.icm.edu.pl)
Date:Jul 7, 2006 6:31:33 am
List:net.sourceforge.lists.courier-sqwebmail

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&nbsp;');\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\"
/>&nbsp;%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