WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#36127 closed defect (bug) (duplicate)

wp_text_diff creates wrong number of columns html table using $args

Reported by: iamklaus Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4.2
Component: Revisions Keywords:
Focuses: Cc:
PR Number:

Description

wp_text_diff creates a wrong number of columns html table. Here is my HTML output:

<table class='diff'>
<col class='content' /><thead><tr class='diff-title'><th colspan='4'>Differences</th></tr>
<tr class='diff-sub-title'>
	'''<td></td>'''<th>Old Version</th>
	'''<td></td>'''<th>New Version</th>
</tr>
</thead>
<tbody>
<tr><td class='diff-context'>asdfsadfasdfasd</td><td>&nbsp;</td><td class='diff-context'>asdfsadfasdfasd</td></tr>
<tr><td class='diff-deletedline'>fgsdvvdddTTfbgd fcccccdfsdcddfdvvv sdfdsf fgs sdfkjdnsfs fsadf asdf asdf sadf asd f <del>asd</del> f asd fas df asd f sad f asvd f asdfasdfasdfasd f asdf asd f asdf asdfasdfas
</td><td>&nbsp;</td><td class='diff-addedline'>fgsdvvdddTTfbgd fcccccdfsdcddfdvvv sdfdsf fgs sdfkjdnsfs fsadf asdf asdf sadf asd f <ins>afsd</ins> f asd fas df asd f sad f asvd f asdfasdfasdfasd f asdf asd f asdf asdfasdfas
</td></tr>
<tr><td class='diff-deletedline'><del>dsdfsadfasdf</del> asdf asdf asdf sdfasd
</td><td>&nbsp;</td><td class='diff-addedline'><ins>dsdfsafdfasdf</ins> asdf asdf asdf sdfasd
</td></tr>
<tr><td class='diff-context'>fsadfasdfasdfasdfasdfasdfasdfds fa sdf sadf sd fgsd fgdsf gs dfg dsfg sdfg d gergt ewr gerth rtzj rtzu tzu trzj dfg j gtn fdg ndfg b sdfghVVrthsdf g sdf dsfgsdf gdsfg  sdf g sdfgdsfgsdfg</td><td>&nbsp;</td><td class='diff-context'>fsadfasdfasdfasdfasdfasdfasdfds fa sdf sadf sd fgsd fgdsf gs dfg dsfg sdfg d gergt ewr gerth rtzj rtzu tzu trzj dfg j gtn fdg ndfg b sdfghVVrthsdf g sdf dsfgsdf gdsfg  sdf g sdfgdsfgsdfg</td></tr>
<tr><td class='diff-context'>sdfgsdfgdsfgsd</td><td>&nbsp;</td><td class='diff-context'>sdfgsdfgdsfgsd</td></tr>

</tbody>
</table>

Attachments (1)

Screen Shot 2016-03-06 at 12.23.59.png (58.2 KB) - added by iamklaus 4 years ago.
Rendered HTML

Download all attachments as: .zip

Change History (2)

#1 @SergeyBiryukov
4 years ago

  • Component changed from General to Revisions
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @iamklaus, welcome to Trac!

Thanks for the report, we're already tracking this issue in #25473.

Note: See TracTickets for help on using tickets.