[wp-trac] [WordPress Trac] #28323: Incorrect HTML tag filtering in get_comments function.

WordPress Trac noreply at wordpress.org
Wed May 21 11:21:52 UTC 2014


#28323: Incorrect HTML tag filtering in get_comments function.
--------------------------+----------------------
 Reporter:  Rextc         |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Comments      |     Version:  3.9.1
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------
Changes (by SergeyBiryukov):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 `$comment->comment_content` gives you raw comment content.

 You should use [http://codex.wordpress.org/Function_Reference/comment_text
 comment_text()] instead, which applies
 [http://codex.wordpress.org/Function_Reference/force_balance_tags
 force_balance_tags()] via `comment_text` filter.

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


More information about the wp-trac mailing list