I'm working on a Drupal site using the excellent Mothership to try and clean up the mess of code that Drupal normally outputs. It's a fantastic theme to use as a base if anyone is interested in trying to clean their markup up btw.
Now I have a sub heading that I want to output in h2 tags which currently looks like this:
<h2>
<div class="field field-name-field-sub-heading field-type-text-long field-label-hidden">
We have, as a company, over 28 years of electrical installation experience. We have carried out electrical and associated systems installation in a vast variety of buildings and locations throughout the British Isles ranging in size up to £1,000,000.
</div>
</h2>
I thought setting the display to plain text would give me a nice clean <h2>Content</h2>
but it's the same.
Is there a nice Drupal way of cleaning this up? Adding strip_tags()
in does the trick but is there a better way?