I have a view of news items and I'm using the HTML5 time tag e.g. <time datetime="2012-12-25T00:00:00+00:00">25 December 2012</time>. But my field: "Content:Post date" is wrapped in span tags. So I'm getting <time datetime="<span>2012-12-25T00:00:00+00:00</span>">. Style settings > Add default classes is unchecked. My other fields aren't wrapped in span tags, only the "post date" ones. I have 3 template files to theme the view (views-view-fields--my-apps-news.tpl.php, views-view--my-apps-news.tpl.php, views-view-unformatted--my-apps-news.tpl.php). My views-view-fields--my-apps-news.tpl.php looks like:

<time datetime="<?= $fields['created_1']->content ?>"><?= $fields['created']->content ?></time>

BTW the date format for the HTML datetime attribute is Y-m-d\TH:i:sP

Comments

Theme developer module was the problem

It turns out that the theme developer module was wrapping everything in spans. Disabling it fixed it.

Mark

nobody click here