[wp-trac] [WordPress Trac] #54851: Prevent unnecessary code comments from being output to the front end

WordPress Trac noreply at wordpress.org
Tue Jan 18 13:01:49 UTC 2022


#54851: Prevent unnecessary code comments from being output to the front end
--------------------------+-----------------------------
 Reporter:  kjellr        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  minor         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Gutenberg's "Post Comments" block appears to pull its code from the
 WordPress' theme compat `comments.php` file here:

 https://github.com/WordPress/wordpress-
 develop/blob/a0b1f27de6c928fde51bbc7078b32ca9c9d6ed8d/src/wp-includes
 /theme-compat/comments.php#L30-L75

 This includes some code comments that may be useful for developers, but
 don't actually need to be send to the front end:

 [[Image(http://cldup.com/ebPNDuXdBe.png)]]

 I'd suggest we change these from HTML comments to PHP comments, so they
 aren't visible in the outputted markup.


 ---

 Related: https://github.com/WordPress/gutenberg/issues/37989

 Tested with Gutenberg 12.4
 WordPress 5.8.3

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54851>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list