Valid W3C HTML

Permalink
Hi!

I would like to ask if there is some HTML code refactorisation planned for Concrete5 blocks to make them W3C valid.

For example YouTube block is not validated because of ampresand in URL's and an embed tag. I believe it should be based on OBJECT tag instead of embed.

Link with post about validation of embed tag:
http://www.v7n.com/forums/coding-forum/23410-html-validation-flash-...

There are also few problems with other blocks. It's not a big effort to repair it but it would be better if it's done in base version.

It would be great if developer shouldnt have to change block's HTML to make them W3C valid on their own.

I think you should also check for W3C validation before releasing 3rd party modules to marketplace.

htarlov
View Replies:
htarlov replied on at Permalink Reply
htarlov
My W3C valid code for view.php in youtube block:

<?php 
defined('C5_EXECUTE') or die(_("Access Denied."));
$url = parse_url($videoURL);
parse_str($url['query'], $query);
$c = Page::getCurrentPage();
$vWidth=425;
$vHeight=344;
if ($c->isEditMode()) { ?>
   <div class="ccm-edit-mode-disabled-item" style="width:<?php echo $vWidth?>px; height:<?php echo $vHeight?>px;">
      <div style="padding:8px 0px; padding-top: <?php echo round($vHeight/2)-10?>px;"><?php echo t('Content disabled in edit mode.')?></div>
   </div>
<?php  }else{ 
  $movie = 'http://www.youtube.com/v/'.$query['v'].'&amp;hl=en';
?>
<object width="<?php echo $vWidth?>" height="<?php echo $vHeight?>" data="<?php echo $movie?>" type="application/x-shockwave-flash">
Shotster replied on at Permalink Reply
Shotster
This topic has been discussed much. Just type "w3c valid" into the search field and you'll have plenty to peruse. :-)

-Steve