4

I have the following markup:

<figure>
<img src="file.jpg">
<figcaption>
<h3>The Father</h3>
<p>Born in 1972, a fisherman by trade</p>
</figcapion>
</figure>

With the Full HTML filter:

  • The "add line breaks" option adds in lots of superfluous <br>'s

  • The "correct faulty HTML" means that adding <p> and <h3> sees the caption get chucked outside of the mangling the layout

The thing is, I like automatic line breaks and I like faulty HTML being corrected, and I don't want my content creators to have to think which filter to use, or have to add in paragraph tags because they decide to use a <figcaption> tag.

Is there any module/option that can make these parts of the Full HTML filter work nicely with HTML5?

1

I just came across the same issue, and although this is a rather old question I thought I'd give my solution in case any others find their way here.

Text formats have the option to correct 'faulty' HTML, although it's not the best choice if you'd still like to make sure that actual faulty HTML is corrected, you can turn this off by navigating to:

HOME > ADMINISTRATION > CONFIGURATION CONTENT AUTHORING > TEXT FORMATS > %your format%

Deselect 'Correct faulty and chopped off HTML' and Drupal will stop mangling section, article, figure, and other useful HTML5 tags.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.