[wp-trac] [WordPress Trac] #11986: HTML comments in post/page content get wrapped in P tags

WordPress Trac noreply at wordpress.org
Sun Feb 2 16:41:14 UTC 2014


#11986: HTML comments in post/page content get wrapped in P tags
--------------------------+-------------------------
 Reporter:  NPSites       |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Editor        |     Version:  2.9.1
 Severity:  normal        |  Resolution:  worksforme
 Keywords:  gsoc          |     Focuses:
--------------------------+-------------------------
Changes (by azaozz):

 * status:  new => closed
 * resolution:   => worksforme
 * milestone:  Future Release =>


Comment:

 HTML comments can only be added in the Text editor or by plugins in the
 Visual editor. They are treated as text by wpautop.

 If the comment is on its own, it is wrapped in a <p> tag. This is actually
 useful for the <!--more--> tag, so the content is split without leaving
 behind broken tags. If the comment is "inline" with other text, it is
 treated as part of that text. So the plugin or the user in the Text editor
 can decide what happens to the comment in wpautop.

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


More information about the wp-trac mailing list