Valid W3C HTML


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:

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.

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

defined('C5_EXECUTE') or die(_("Access Denied."));
$url = parse_url($videoURL);
parse_str($url['query'], $query);
$c = Page::getCurrentPage();
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>
<?php  }else{ 
  $movie = ''.$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
This topic has been discussed much. Just type "w3c valid" into the search field and you'll have plenty to peruse. :-)