Nesting Syndrome

29 April 2008

Best practice in HTML is to put quotations into Q[uotation] elements, so that the mark-up looks like this:

Sam growled <q>I asked him, and he said <q>I swear on me mother's grave!</q></q>

rather than like this:

Sam growled “I asked him, and he said ‘I swear on me mother's grave!’”

Note that it is possible to have one Q[uotation] element inside of another — a good style-sheet will handle that.

Unfortunately, the WordPress editor seems to have been written by a programmer who believes that Q[uotation] elements must not nest, and the editor tries to fix things when it encounters nesting, by closing the outer element when it comes to the inner element. In the case of my previous entry, it then discarded the original closing </q> tag of the outer element, but (who knows why?) added an extra </div> at the end of the entry. The appearance of the whole page went to H_ll.

I fixed things by by-passing the WordPress software, and editing the 'blog's underlying dB with phpMyAdmin.

I've filed a bug report.

(I still need to arrive at a good specification of the list-bug that plagues my entry on installing Open Office.)

Tags: , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.