You are here:  » W3C validator


W3C validator

Submitted by henk on Wed, 2013-01-16 16:17 in

Hello David,

I have tested my site and there were several problem when i tested on W3C:

{link saved}

Is this a big problem? Or?

16 warnings on images from the merchant.
Thx
Henk

Submitted by support on Wed, 2013-01-16 16:29

Hello Henk,

As the WordPress theme that you are using declares itself as XHTML strict you have to be very careful with the markup to ensure compliance - otherwise warnings will result! I had a quick look through and most should be easily resolvable within your theme - missing attributes (defined as mandatory under XHTML strict) etc.

Regarding the warnings relating the image HTML, these should be htmlspecialchars encoded in this case. To test this, on the page you posted they are reference Featured Products, so if you edit pto_featured.php and look for the following code at line 81:

  $each = str_replace("%IMAGE_URL%",$row->image_url,$each);

...and REPLACE with:

  $each = str_replace("%IMAGE_URL%",htmlspecialchars($row->image_url),$each);

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by henk on Thu, 2013-01-17 13:40

I have tried several options, other template, other !DOCTYPE, but all gives errors and not validated:

document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
…t-align: left;">

{link saved}

Thx
Henk

Submitted by support on Thu, 2013-01-17 14:10

Hi Henk,

The validator describes one possible cause of that error as having a block level element (DIV) inside an inline element, which looks like the case here as it is immediately precceded by a SPAN:

<p style="text-align: left;"><span style="font-size: small;"> <div class='pto_search_form' >

So that should be all it is - I don't think that's part of the Search Form template as it would normally begin <div class='pto_search_form' > so it's most likely theme HTML that encloses page / post body content.

Ideally, rather than using a span in that case, it should be OK to putt the font-size: small into the style tag of the preceding P element, which should do the trick...

Hope this helps!
Cheers,
David
--
PriceTapestry.com

Submitted by henk on Sat, 2013-01-19 15:47

Hi David,

At the moment i am stuck, i got it to 11 errors but do i have to change the template or, because all templates i used gives the same errors:

{link saved}

I hope you can help me.

Thx
Henk

Submitted by support on Sun, 2013-01-20 09:59

Hi Henk,

I've taken a copy of the raw .HTML generated by your site so that I can test it my making changes and uploading to the validator ; I'll give it a good look through and let you know if I can get your theme to validate...

Cheers,
David.
--
PriceTapestry.com

Submitted by henk on Sun, 2013-01-20 11:33

Hi David,

That would be nice, thank you.

Henk