[wp-trac] Re: [WordPress Trac] #6485: wpautop removes closing P tag from empty paragraph above a table

WordPress Trac wp-trac at lists.automattic.com
Wed May 7 17:48:53 GMT 2008


#6485: wpautop removes closing P tag from empty paragraph above a table
--------------------------+-------------------------------------------------
 Reporter:  jpxwordpress  |        Owner:  anonymous
     Type:  defect        |       Status:  reopened 
 Priority:  low           |    Milestone:  2.7      
Component:  General       |      Version:  2.5      
 Severity:  minor         |   Resolution:           
 Keywords:  wpautop       |  
--------------------------+-------------------------------------------------
Changes (by azaozz):

  * keywords:  wysiwig editor alters text => wpautop
  * priority:  high => low
  * summary:  WP 2.5 WYSIWIG editor alters post data while editing =>
              wpautop removes closing P tag from empty
              paragraph above a table
  * severity:  major => minor
  * milestone:  => 2.7

Comment:

 Replying to [ticket:6485 jpxwordpress]:
 > For example, the first post I tried to make and then edit after going
 from 'HTML' to 'Visual' mode in the post editing window garbled the
 appearance of the post immediately after I hit 'SAVE'. What it did,
 specifically, was move different lines of text too close together/took out
 line breaks I had wanted, and reduced size of font on some lines with
 links.
 Line spacing and font size is controlled by your theme's style.css. Trying
 to alter appearance by adding empty <p> and <br /> tags is an outdated
 practice, so wpautop removes them.

 Looking at your example: if you want more space around the table, why not
 make a new style for it in style.css, or even add inline style (if you
 want it only on this table)? Also for using tables in TinyMCE, you will
 need to add the "table" plugin for it or install a WordPress plugin that
 adds it.

 The only error here seems to be that wpautop removes the closing </p> tag
 when an empty paragraph is immediately above a table, which is a very rare
 case as tables are not supported by default in the WYSIWYG editor and
 empty paragraphs are considered bad html coding practice.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6485#comment:4>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list