Ticket #4298 (new defect (bug))

Opened 2 years ago

Last modified 10 months ago

wpautop bugs

Reported by: Denis-de-Bernardy Assigned to: anonymous
Priority: low Milestone: 2.9
Component: Template Version: 2.2
Severity: minor Keywords:
Cc:

Description

wpautop should at least ignore multiline html tags, and possibly ignore any area enclosed within html.

<table
 style="width: 120px; height: 92px; text-align: left; margin-left: auto; margin-right: auto;"
 border="1" cellpadding="7" cellspacing="2">
  <tbody>
    <tr>
      <td><small><small style="font-family: Arial;">Once
I saw it here, I instantly knew what I wanted. I love my new woven wood
shades.</small></small><br>
      <small><small>- Ginny Good</small></small></td>
    </tr>
  </tbody>
</table>

gets formatted as:

<table<br />
 style="width: 120px; height: 92px; text-align: left; margin-left: auto; margin-right: auto;"<br />
 border="1" cellpadding="7" cellspacing="2"><br />
<tbody>
<tr>
<td><small><small style="font-family: Arial;">Once<br />
I saw it here, I instantly knew what I wanted. I love my new woven wood<br />
shades.</small></small><br /><br />
      <small><small>- Ginny Good</small></small></td>

</tr>
</tbody>
</table>

Change History

05/22/07 19:23:17 changed by foolswisdom

  • milestone changed from 2.2.1 to 2.4.

12/28/07 04:37:13 changed by darkdragon

  • component changed from Administration to Template.

03/14/08 00:59:50 changed by Denis-de-Bernardy

Reformatting tags like this before auto-formatting might work:

$str = preg_replace("/

(<[>]+) \n ([>]*>) /x", , $str);

D.

03/14/08 01:01:05 changed by Denis-de-Bernardy

  • priority changed from normal to low.
  • severity changed from normal to minor.

It should occur after escaping stuff we don't want to autop, though, i.e. scripts, objects, etc.

03/29/08 16:22:47 changed by lloydbudd

  • milestone changed from 2.5 to 2.6.