[wp-trac] [WordPress Trac] #33645: wpautop breaks HTML comments

WordPress Trac noreply at wordpress.org
Tue Sep 8 20:18:53 UTC 2015


#33645: wpautop breaks HTML comments
--------------------------+-----------------------
 Reporter:  Thomas Hicks  |       Owner:  azaozz
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  4.3.1
Component:  Formatting    |     Version:  4.2.4
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------

Comment (by azaozz):

 This is caused by not replacing the line break placeholders `<!-- wpnl
 -->` at the end of wpautop(). So the first line of the patch is not needed
 in order to fix it.

 I'm also a bit unsure about `'!(<' . $allblocks . '[\s>])!'` in a dot
 release. Before we used to match the whole tag, now we match just the
 beginning. That looks fine but might introduce other edge cases and we
 don't have adequate tests for it. Also, it has to be `'!(<' . $allblocks .
 '[\s/>])!'` to match things like `<hr/>`.

 How about we add 33645.2.patch without the first line to 4.3.1, and add
 the revised patch to 4.4?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33645#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list