[wp-trac] Re: [WordPress Trac] #2992: HTML editor deletes rows (that have properties) from tables

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 10 21:12:55 GMT 2007


#2992: HTML editor deletes rows (that have properties) from tables
----------------------------+-----------------------------------------------
 Reporter:  FireMotion      |        Owner:  anonymous
     Type:  defect          |       Status:  new      
 Priority:  high            |    Milestone:  2.1      
Component:  Administration  |      Version:  2.0      
 Severity:  blocker         |   Resolution:           
 Keywords:  data-loss       |  
----------------------------+-----------------------------------------------
Changes (by foolswisdom):

  * keywords:  => data-loss
  * severity:  major => blocker
  * milestone:  2.2 => 2.1

Old description:

> '''Summary'''[[BR]]
> Concerning tables: When rows have properties, and there are multiple rows
> in the table, then only the first row is saved (i.e. the other rows are
> deleted).
>
> '''Example'''[[BR]]
> Original code:
> {{{
> <table>
>   <tr class="toprow">
>     <td>1</td>
>     <td>2</td>
>   </tr>
>   <tr class="row2">
>     <td>3</td>
>     <td>4</td>
>   </tr>
>   <tr class="row3">
>     <td>5</td>
>     <td>6</td>
>   </tr>
> }}}
>
> Apparantly, because the `<tr>` tags have properties (in this case
> `class`, but originally I was using `valign` properties, even though they
> might not be official `<tr>` properties), only the first row is kept. It
> doesn't matter how many rows there are.
>
> HTML code after saving, or after viewing the HTML source through the HTML
> source editor:
> {{{
> <table>
>         <tr class="toprow">
>                 <td>1</td>
>                 <td>2</td>
>         </tr>
> </table>
> }}}

New description:

 Concerning tables: When rows have properties, and there are multiple rows
 in the table, all rows but the first will be deleted when you revisit the
 Code tab.

 REPRO: always [[br]]
 STEPS: [[br]]

 1. as admin (also confirmed with author, but stripping not deleting is
 appropriate then) [[br]]
 2. In Write Post, click Code tab [[br]]
 3. Enter
 {{{
 <table>
   <tr class="toprow">
     <td>1</td>
     <td>2</td>
   </tr>
   <tr class="row2">
     <td>3</td>
     <td>4</td>
   </tr>
   <tr class="row3">
     <td>5</td>
     <td>6</td>
   </tr>
 </table>
 }}}
 4. Click Save and Continue Editing or Visual tab
 5. Click Code tab

 ACTUAL RESULT
 {{{
 <table>
         <tr class="toprow">
                 <td>1</td>
                 <td>2</td>
         </tr>
 </table>
 }}}

 ADDITIONAL DETAILS [[BR]]
 Apparently, because the `<tr>` tags have properties (in this case `class`,
 but originally I was using `valign` properties, even though they might not
 be official `<tr>` properties), only the first row is kept. It doesn't
 matter how many rows there are.

Comment:

 Confirmed bug. [[br]]
 ENV: WP 2.1-beta1 r4716

 Updating ticket description.

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


More information about the wp-trac mailing list