It looks like the «xhtml»-field-formating in EE 2.5.5 has problems with figure and figcaption. If I write…

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

<figure class="quote"><blockquote>bla bla bla</blockquote><figcaption>Willhelm Tell</figcaption></figure>

Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

… into a custom field with xhtml-field-formatting, the following will be rendered:

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p><figure class="quote"><blockquote><p>bla bla bla</p>
</blockquote><p></p><figcaption><p></p><p>Willhelm Tell</p><p></p></figcaption><p></p><p></p></figure><p></p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>

which obviously is everything else than «optimal» ;-)

How can I tell EE to ignore figcaption and figure in «xhtml»-field-formating?


I found out that this is actually inside CodeIgniter.

To add new HTML5 tags like <figure> and <figcaption> to the list of « do not wrap with <p> tags», just add them to the array located ~ line 30 of /system/codeigniter/system/libraries/Typography.php (the arrays $block_elements and/or $skip_elements).

I've also added an EE Bug Report for this. The new tags should hopefully be included into future EE releases.

  • 4
    Please improve your answer by being more specific about what you found and how you actually fixed this problem. It will help other folks out more. Then you can mark it as the accepted answer in a couple of days. – Derek Hogue Jan 7 '13 at 18:53
  • @DerekHogue done – albuvee Jan 8 '13 at 8:34

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.