[wp-hackers] WP 2.5 gallery breaking xhtml 1.0

Knut-Olav Hoven hovenko at linpro.no
Wed Jun 18 15:58:51 GMT 2008

On Wednesday 18 June 2008 09:21:22 Jeremy Visser wrote:
> On Tue, 2008-06-17 at 12:45 +0200, Knut-Olav Hoven wrote:
> > When inserting a [gallery] tag in a post it breaks XHTML validation.
> >
> > <style> elements are not allowed inside <div> elements.
> Can you provide us with instructions on how to reproduce this?

insert the [gallery] string in a post with images using WordPress 2.5.1

> Looking at one of Matt's galleries:
> http://ma.tt/2008/06/exploring-ios/
> ...the markup on Matt's page doesn't contain anything like you describe.

because he is running 2.6-bleeding?

> Perhaps it is a problem with your theme -- can you reproduce it with the
> default theme?

I would rather not, since it's in "production", but it's not the theme it 
depends on, it's the code that replaces the [gallery] string in every post.

I see from the links Benedict provides (ticket #6496) that this is a known 
issue... Too bad it hasn't been fixed yet.

> Your theme should contain the code: 
> <?php do_action('wp_head'); ?>
> Does it?

yes it does

For an example... look at the source code of http://hovenko.no/blog/ around 
line 85. The style-element is invalid inside of <body /> in xhtml.

Knut-Olav Hoven
Systemutvikler               mob: +47 986 71 700
Linpro AS                    http://www.linpro.no/

More information about the wp-hackers mailing list