• Resolved rcgoncalves

    (@rcgoncalves)


    Since one of the recent upgrades (maybe 4.2?), WordPress started adding line breaks inside figure elements, before figcaption.

    For example, if I use the code:

    <figure class="wp-caption aligncenter" style="width: ...px;"><a href="..."><img class="aligncenter size-full" src="..." alt="..." width="436" height="338" /></a><figcaption class="wp-caption-text">Figure 1: ...</figcaption></figure>

    after publishing, it is transformed in:

    <figure class="wp-caption aligncenter" style="width: ...px;"><a href="..."><img class="aligncenter size-full" src="..." alt="..." width="436" height="338" /></a><br /> <figcaption class="wp-caption-text">Figure 1: ...</figcaption> </figure>

    (Note the <br /> before <figcaption.)

    I can hide the line break using CSS, but I’d rather avoid this kind of hacks. Is there any way to stop this behavior? Shall this be considered a bug?

    I already tried to disable the wpautop feature, without success.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Line breaks added before figcaption’ is closed to new replies.