WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 6 years ago

#2285 closed enhancement (wontfix)

Wpautop strips blank lines

Reported by: linickx Owned by: skeltoac
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: Formatting Keywords:
Focuses: Cc:

Description

Non-Techie users like to user spaces & carrige returns for formatting text.

Using the WYSIWYG gui, if you use carrige return 3 times in a text - hoping to create some white space between text - i.e. like entering text1<br /><br /><br />text2 or <p>text1</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>text2</p> - the gui removes them and replace with single <p>text1</p><p>text2</p> which is one line of white space.

I understand that this kind of use may not be best practice, but it's the kind of thing normal users do, and wp is supposed to be a good all round user experience.

Change History (20)

comment:1 @markjaquith10 years ago

  • Owner matt deleted

comment:2 follow-up: @davidhouse10 years ago

Thanks Mark. I aksed him to do that: please don't assign tickets to people without their permission. There are more people than matt that can fix your bug. If matt decides he wants to fix it, he can accept it.

comment:3 @davidhouse10 years ago

Now, for the fix, we could leave anything more than two line breaks as <br/>s instead of trying to paragraph them. We could do the same for more than one space: convert them all to &nbsp;.

comment:4 @skeltoac10 years ago

  • Milestone set to 2.1
  • Owner set to skeltoac
  • Severity changed from major to enhancement
  • Status changed from new to assigned

I'll name that tune in 2.1 notes. If somebody wants to name that tune in 2.0.1 notes, accept the ticket and run with it! :-)

comment:5 @linickx10 years ago

thanks for taking this on guys :-D

[p.s. fyi:- not sure what the 1st comments are about, but new calls assign to matt if you leave the box blank :-) ]

comment:6 @matt9 years ago

  • Milestone changed from 2.1 to 2.2

comment:7 @foolswisdom8 years ago

  • Milestone changed from 2.2 to 2.4

comment:8 in reply to: ↑ 2 @rob1n8 years ago

Replying to davidhouse:

Thanks Mark. I aksed him to do that: please don't assign tickets to people without their permission. There are more people than matt that can fix your bug. If matt decides he wants to fix it, he can accept it.

It automatically assigns it to Matt if it's in the WordPress.org component, I believe.

comment:9 @rob1n8 years ago

  • Component changed from WordPress.org to TinyMCE

comment:10 @Otto428 years ago

This is not a TinyMCE thing, it's wpautop that's doing it. And frankly, I think it's desired behavior. If they want vertical space, they should be using styles on the paragraph. Okay, not the best UX, but perhaps an easier way to insert a vertical space is called for instead of letting the user enter non-semantic P's and BR's?

comment:11 @thee178 years ago

  • Resolution set to wontfix
  • Status changed from assigned to closed

Suggest closing as this is a disired result rather than an error.

comment:12 @Nazgul8 years ago

  • Milestone 2.5 deleted

comment:13 @lloydbudd8 years ago

  • Component changed from TinyMCE to General
  • Milestone set to 2.6
  • Resolution wontfix deleted
  • Status changed from closed to reopened

Re-opening. You are thinking like developers not every day people. Originally this bug had some traction from Andy, and it still seems like the desirable behavior for most people, "I want more spaces on a line so I use the space bar"

comment:14 @thee178 years ago

I thought this was dealing with carrage returns as opposed to spaces. I could see leaving blank br's but not many blank p's.

comment:15 @lloydbudd8 years ago

Sorry, you are correct about the issue described, but it doesn't change the user's expectations of it to just work.

comment:16 @lloydbudd8 years ago

  • Keywords WYSIWYG user experience removed
  • Summary changed from WYSIWYG strips white space - bad user experience to Editor strips blank lines

comment:17 @azaozz7 years ago

  • Summary changed from Editor strips blank lines to Wpautop strips blank lines

The blank lines are stripped by wpautop(), both the js and php versions of it. This seems to be related to users complaining that they cannot enter <br /> tags in a post, but actually trying to produce invalid XHTML (which, of course, is auto-corrected).

Perhaps wpautop should be changed to replace 3 consecutive <br /> with <p>&nbsp;</p>.

comment:18 @Denis-de-Bernardy6 years ago

@azaozz: this wouldn't do much good if tinymce won't let a user insert a non-breaking space.

suggesting wontfix

comment:19 @Denis-de-Bernardy6 years ago

  • Component changed from General to Formatting

comment:20 @Denis-de-Bernardy6 years ago

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

this has been rotting for long enough

Note: See TracTickets for help on using tickets.