Ticket #2285 (reopened enhancement)

Opened 3 years ago

Last modified 8 months ago

Wpautop strips blank lines

Reported by: linickx Assigned to: skeltoac
Priority: normal Milestone: 2.9
Component: General Version: 2.0
Severity: normal Keywords:
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

01/14/06 14:43:28 changed by markjaquith

  • owner deleted.

(follow-up: ↓ 8 ) 01/14/06 14:47:47 changed by 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.

01/14/06 14:53:45 changed by davidhouse

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;.

01/14/06 19:12:53 changed by skeltoac

  • owner set to skeltoac.
  • status changed from new to assigned.
  • severity changed from major to enhancement.
  • milestone set to 2.1.

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! :-)

01/15/06 16:54:06 changed by linickx

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 :-) ]

12/01/06 10:00:14 changed by matt

  • milestone changed from 2.1 to 2.2.

03/27/07 20:23:06 changed by foolswisdom

  • milestone changed from 2.2 to 2.4.

(in reply to: ↑ 2 ) 04/17/07 04:37:05 changed by rob1n

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.

04/17/07 04:37:20 changed by rob1n

  • component changed from WordPress.org to TinyMCE.

04/17/07 04:47:20 changed by Otto42

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?

01/25/08 04:36:31 changed by thee17

  • status changed from assigned to closed.
  • resolution set to wontfix.

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

01/25/08 08:55:48 changed by Nazgul

  • milestone deleted.

01/25/08 17:21:51 changed by lloydbudd

  • status changed from closed to reopened.
  • resolution deleted.
  • component changed from TinyMCE to General.
  • milestone set to 2.6.

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"

01/25/08 20:09:00 changed by thee17

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.

01/25/08 21:20:48 changed by lloydbudd

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

01/25/08 21:21:39 changed by lloydbudd

  • keywords deleted.
  • summary changed from WYSIWYG strips white space - bad user experience to Editor strips blank lines.

03/13/08 22:47:32 changed by azaozz

  • 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>.