TitleImage plugin creates invalid (X)HTML
Date12-Feb-2005 19:31:01 EET
Bug criticalityMediumBug
Browser version
Bug statusClosedBug
PageProvider used
Servlet Container
Operating System
Java version

The image plugin creates a table element and puts the image caption in the table caption attribute.

First, there's always a validation error with the code. The bottom value should be put in quotes: caption="bottom".

Second, if someone makes a paragraph (p element) around the image by inserting a blank line before, it's invalid to have a table or other block-level element inside the p element. Same if someone puts the tabled image inside a table cell.

If there's any way for the plugin programmer to know the context of the image, the code created should be:

  • A table, div, dl (for instance) element if it's valid (ie not inside a block element)
  • A span element with a line-break (br) between the image and the caption otherwise

Unfortunately, there's no way to do that. The Image plugin can be fixed, but considering the way JSPWiki works, it is always possible to produce invalid XHTML from within a plugin. Many of the plugins output a <div>; and if the user puts it inside a <p>, nothing much can be done about it.

-- JanneJalkanen

This sounds like WAD, and almost two years old ==> bug closed.


Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-4) was last changed on 03-Mar-2007 00:21 by HarryMetske