[wp-trac] [WordPress Trac] #62644: Editing comments as an admin, in the Admin UI, filters the HTML elements of the comment as though the edit was done by the original author.

WordPress Trac noreply at wordpress.org
Thu Dec 5 18:07:47 UTC 2024


#62644: Editing comments as an admin, in the Admin UI, filters the HTML elements of
the comment as though the edit was done by the original author.
--------------------------+------------------------------
 Reporter:  turbodb       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Comments      |     Version:  6.7.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by turbodb):

 Replying to [comment:5 siliconforks]:
 > Replying to [comment:4 turbodb]:
 > > Using the {{{wp_kses_allowed_html}}} filter might work, but in your
 example you've limited it to the {{{'pre_comment_content'}}}, which as I
 mentioned in the original bug, already works correctly using the hook of
 the same name.
 >
 > I'm not sure what you mean here?  The `pre_comment_content` hook is not
 the same thing as the `pre_comment_on_post` hook.  I believe that
 `pre_comment_content` is used for both posting new comments and editing
 existing comments.

 Ahh, yep, I was reading too quickly. Let me give that a shot and I'll
 report back. Is there somewhere I can find the list of valid $context
 values? There's not much indication of what those are on
 https://developer.wordpress.org/reference/functions/wp_kses_allowed_html/

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


More information about the wp-trac mailing list