Page 1 of 1

No Valid XHTML 1.0

Posted: Fri Jun 23, 2006 4:23 pm
by Muuhmann
Hi,

I found out that s9y doesn't create valid xhtml, at least not with the Kubirck Port! I'm not using the WYSIWYG-Editor (it creates freakin' invalid XHTML :cry: btw: is there an editor that creates valid xhtml?)

This link shows you what i mean by that. Apparently s9y creates a double p-Tag like:

Code: Select all

<p>
<p>Any Text, doesn't matter if it's short or very long</p>
</p>
And thats what w3c says is wrong about it..
Error Line 40, column 18: document type does not allow element "p" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag .

<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Maybe it's an general bug, because in the Kubrick index.tpl is no unnecessary p-Tag

What files do i have to edit to delete the spare p-tag?

Thanks in advance!

Re: No Valid XHTML 1.0

Posted: Sat Jun 24, 2006 12:33 am
by garvinhicking
Hi!

Actually you are right, that there is a XHTML problem. But it's not within serendipity, it's with the kubrick port.

I think the entries.tpl template of kubrick needs to be removed of the <p> tag and use a <div> instead. Then the CSS would also need to be changed.

Maybe you'd like to patch that file and send us the modifications so we could include it? :))

Best regards,
Garvin

Posted: Sat Jun 24, 2006 2:55 am
by Muuhmann
hi,
i searched for the <p> tag in the entries.tpl (it's in line 21, right under <div class="entrytext">) removed it and tadaa it's valid xhtml 1.0!

i don't think this <p> tag had an important function within this template, because everything looks like before and even if you replace the <p> with a <div>, there is no change the way it looks..

but if you say me that this <p> tag has an very important function and the template won't work without, i'll give it a try and modify the files ;)

http://nopaste.php-q.net/221072 here is my "modification" (replaced <p> with <div>) of the entries.tpl -> Valid XHTML 1.0

Posted: Mon Jun 26, 2006 12:10 pm
by garvinhicking
Hi!

That's good, thanks for looking into it. I also committed that change to our code.

Regards,
Garvin