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

WordPress Trac noreply at wordpress.org
Fri Oct 26 20:30:11 UTC 2018


#2691: HTML comments in posts aren't handled properly.
-------------------------------------------------+-------------------------
 Reporter:  gord                                 |       Owner:
                                                 |  adamsilverstein
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  5.1
Component:  Formatting                           |     Version:  2.8.5
 Severity:  normal                               |  Resolution:
 Keywords:  wpautop dev-feedback has-patch has-  |     Focuses:
  unit-tests                                     |
-------------------------------------------------+-------------------------

Comment (by GunGeekATX):

 Ran into this problem today, though it was my code at first, but found
 this ticket.  WordPress 4.9.8 and Gutenberg 4.1.1. I created a dynamic
 block using only a title.


 {{{
 $ ./bin/wp.sh post get 75846 --field=post_content
 <!-- wp:paragraph -->
 <p><del>This is a paragraph.</del></p>
 <!-- /wp:paragraph -->

 <!-- wp:client/custom-block {"title":"This is the title"} /-->

 <!-- wp:paragraph -->
 <p></p>
 <!-- /wp:paragraph -->
 }}}

 When I view source on the page:
 {{{
 <!-- wp:paragraph -->
 <p><del>This is a paragraph.</del></p>
 <!-- /wp:paragraph -->



 <!-- wp:paragraph -->
 <p></p>
 <!-- /wp:paragraph -->
 }}}

 Changing the priority of the {{{do_blocks}}} call from 7 to 5 in the
 Gutenberg plugin fixes it. My assumption is autop is running before
 Gutenberg and stripping out the dynamic block.

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


More information about the wp-trac mailing list