Comments and XHTML 1.1 now play nicely

08/13/2008 18:30:53

It took a bunch of playing around, but I finally got things working (I think) so that I can have both MathML and comments.

First, you have to change the JavaScript Index Template (mt.js):

  1. Find the writeCommenterGreeting function

  2. add the following line as first step:

    container = document.getElementById("comment-form-external-auth");
    
  3. all instances of document.write need to be changed to container.innerHTML = and set to equal the string that was to be written

  4. The content written to innerHTML needs to have all ampersands written as & to be XHTML 1.1 “safe”

Next, you have to change the Comment Form Template to remove the “” around the javascript section to make it XHTML 1.1 safe.

Rebuild your site, and I think comments will now work with the rest of your XTHML 1.1 site, when served as application/xhtml+xml.

Please let me know if you find errors on my site in this (or any other) regard.

Similar Pages