WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#7036 closed defect (bug) (wontfix)

Bad side effect of automatically changing <br /><br />

Reported by: agro1986 Owned by:
Milestone: Priority: low
Severity: normal Version:
Component: General Keywords: wpautop
Focuses: Cc:

Description

Wordpress 2.5.1 changes this code:

<p class="secret">a<br /><br />b</p>

into:

<p class="secret">a</p><p>b</p>

Obviously this ruins layouting with CSS, for example if I want .secret to have a red background on a red text.

Change History (4)

comment:1 tonyf126 years ago

I can't imagine anything can be done about that as the second behavior is more suitable in most cases (I'd guess ~70%). Maybe they should implement some <noparse> ability similar to wiki's <nowiki> tag.

comment:2 caesarsgrunt6 years ago

  • Priority changed from high to low

-1. This is expected behaviour in maybe 95% of cases.
Yes, [noparse]...noparse would be good, but it's not high priority.

comment:3 matt6 years ago

  • Keywords wpautop added
  • Milestone changed from 2.7 to 2.9

comment:4 Viper007Bond5 years ago

  • Milestone 2.9 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Just use a <div>:

<div class="secret">

a

b

</div> 

Note the line spacing between the <div> and the "a" is required though due to unrelated buginess in wpautop() (you'll end up without an opening <p> otherwise).

Note: See TracTickets for help on using tickets.