Recent Topics

[fixed] non-XHTML 1.0 Strict stuff

Started by on Apr 23, 2007 – Contents updated: Apr 23, 2007

Apr 23, 2007 19:19    

For v1.9.x
Bug: embedded HTML (unless I missed it [working late again], I can't find it under skin folder[s])
Level: Normal
Suggestion: remove border="0" and align (explained below) and make a permanent change for the next release.
Result: next b2e release will produce XHTML 1.0 Strict codes, it is now up to the skin creator and the blogger himself.
Pros: gratz b2e :p
Cons: we'll forget this sooner or later :p

Hi,

Just found out a few embedded non-XHTML 1.0 Stuff... these are coming from:


$Item->msgform_link( $Blog->get('msgformurl') );


and the permalink icons.

I think these are the last bits embedded that do not conforms to the XHTML 1.0 Strict DTD (as I tested it). Which files could these be located? And can I suggest we make this a permanent change for the next release?

The errors are:
border="0"
and
align="top" (if I recall correctly).

Thanks :D

Apr 26, 2007 09:08

This has been raised before and the answer was "it's valid transitional" :S

One solution is this :-

<body>
<?php ob_start(); ?>

......

</body>
<?php
$the_page = ob_get_contents();
ob_end_clean();
echo str_replace( array( 'border="0"', 'align="top"' ), '', $the_page );
?>

;)

¥

Apr 26, 2007 09:31

Ahh I see.

But, can't we make it valid strict instead as part of b2e itself? I mean, there's CSS, and the web is going to the direction of 'strict' DTDs.

Additionally, those are the only parts left that's not validating against strict, most of the other parts were cleaned up, so was suggesting, let's clean it up all-the-way?

Dunno, just a thought, we have default b2e CSS files anyway.
My main concern only is, to have less php stuff or avoiding editing the core files, which when there's a new b2e, we tend to forget to add the clean-up stuff.

Haven't check if b2e validates against XHTML 1.1 which is strict DTD only. Have to try that, if it validates without the transitional border and stuff, I think it will be great to add to b2e's reputation as validating to XHTML 1.1 ;)

Well, just my view. Anyway, W3C said we use the strict as much as possible. b2e is very close... just those border and align attributes are left and we can tell the whole world we're clean strict.

Apr 26, 2007 09:51

I agree, I always aim to conform to strict I just got fed up of hacking the files with every upgrade so I went with a variation of the solution above.

Since then I've changed to a simpler solution .... I don't use their icons :P

¥

Apr 26, 2007 16:01

¥åßßå wrote:

I agree, I always aim to conform to strict I just got fed up of hacking the files with every upgrade so I went with a variation of the solution above.

Since then I've changed to a simpler solution .... I don't use their icons :P

¥

The php clean-up option is great, though I just to avoid additional parsing stuff if possible.
I'm actually thinking of dropping the icons myself... for the sake of strict DTD, hehe.

Anyway thanks! Just going back to my roots of conforming to the latest standard... I stopped doing so since CMS'es appeared, which are mostly non-conforming (the days when Nuke CMS'es dominates the market).

Have to get used to strict again, and I want to start with my blog... hehe.
Hoping b2e v2.0 will validate at least to XHTML 1.0 Strict then.

^_^

Aug 26, 2007 01:49

I just add the following to the CSS file.... ( a lazy fix )
.bSmallHead img{display:none;}
.bSmallPrint img{display:none;}
.bCommentSmallPrint img{display:none;}

Aug 26, 2007 09:34

Since 1.10.x you should find that setting $use_strict = true in conf/_formatting.php makes the core spit out valid code.

There's also a couple of new settings to allow id & style for posts / comments in the same file ;)

¥

Aug 26, 2007 11:41

Thanks for that tip ¥åßßå.
These things get easily forgotten :)


Form is loading...

Free CMS – This forum is powered by b2evolution CMS, a complete engine for your website.