[wp-trac] [WordPress Trac] #2691: HTML comments in posts aren't handled properly.

WordPress Trac wp-trac at lists.automattic.com
Mon Feb 28 06:45:23 UTC 2011


#2691: HTML comments in posts aren't handled properly.
---------------------------------+-----------------------------
 Reporter:  gord                 |       Owner:  anonymous
     Type:  defect (bug)         |      Status:  reopened
 Priority:  normal               |   Milestone:  Future Release
Component:  General              |     Version:  2.8.5
 Severity:  normal               |  Resolution:
 Keywords:  wpautop needs-patch  |
---------------------------------+-----------------------------
Changes (by mrclay):

 * cc: mrclay (added)


Comment:

 I've created a more resilient
 [http://code.google.com/p/mrclay/source/browse/trunk/php/MrClay/AutoP.php
 autop implementation] and a more rigorous
 [http://code.google.com/p/mrclay/source/browse/trunk/php/MrClay/AutoP/test.php
 testcase] cobbled from various WP tickets. It avoids the dangerous regex
 operations by doing most work in a DOMDocument object.

 This is undoubtedly slower than current wpautop (and may choke on
 extremely invalid HTML), but happily handles markup that the current
 wpautop breaks. Since there's no real spec for wpautop, it's hard to
 duplicate the style of markup wpautop outputs when it ''does'' work, but a
 lot of testing will surely be necessary.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/2691#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list