Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#56101 closed defect (bug) (fixed)

Need to use esc_html escaping function instead of esc_attr.

Reported by: chintan1896 Owned by: audrasjb
Priority: normal Milestone: 6.1
Component: Comments Version: 2.7
Severity: normal Keywords: has-patch commit
Cc: Focuses:

Description

Need to use esc_html escaping function instead of esc_attr in class-wp-comments-list-table.php file.

Attachments (1)

56101.patch​ (1.0 KB ) - added by chintan1896 4 years ago.

Download all attachments as: .zip

Change History (6)

#1 @afragen
4 years ago

Seems correct in both reasoning and patch.

#2 @peterwilsoncc
4 years ago

  • Component Administration → Comments
  • Milestone Awaiting Review → 6.1
  • Version trunk → 3.1

I've put this on the milestone for inclusion in WP 6.1.

The bug was introduced with the comment list table in [15955] during WordPress 3.1 so I've set the version accordingly.

#3 @SergeyBiryukov
4 years ago

  • Keywords commit added
  • Version 3.1 → 2.7

Hi there, thanks for the patch! It looks good to me and seems to match the escaping of comment author's email in WP_Comments_List_Table::column_author().

This was not introduced in [15955] though, it dates back to [9098] / #7435 for WP 2.7, followed by [11109] and [11204].

#4 @audrasjb
4 years ago

  • Owner set to audrasjb
  • Status new → accepted

Self assigning for commit, as it looks good to go.

#5 @audrasjb
4 years ago

  • Resolution → fixed
  • Status accepted → closed

In 53640:

Comments: Use more appropriate escaping functions in class WP_Comments_List_Table.

This changeset replaces esc_attr escaping function with esc_html as it is more appropriate in this context.

Props chintan1896, afragen, peterwilsoncc, SergeyBiryukov.
Fixes #56101.

Note: See TracTickets for help on using tickets.