Skip to:
Content

bbPress.org

Opened 6 years ago

Closed 6 years ago

#3210 closed defect (bug) (fixed)

Don't use esc_html__() in combination with <strong> in messages

Reported by: wpdennis's profile wpdennis Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version: trunk
Component: API - Anonymous Posting Keywords: commit
Cc:

Description

In bbp_filter_anonymous_post_data() is esc_html_ _() used with html tags. I think it should use _ _() instead in:

<?php
        // Filter name
        $r['bbp_anonymous_name'] = apply_filters( 'bbp_pre_anonymous_post_author_name', $r['bbp_anonymous_name'] );
        if ( empty( $r['bbp_anonymous_name'] ) ) {
                bbp_add_error( 'bbp_anonymous_name',  esc_html__( '<strong>ERROR</strong>: Invalid author name.', 'bbpress' ) );
        }

        // Filter email address
        $r['bbp_anonymous_email'] = apply_filters( 'bbp_pre_anonymous_post_author_email', $r['bbp_anonymous_email'] );
        if ( empty( $r['bbp_anonymous_email'] ) ) {
                bbp_add_error( 'bbp_anonymous_email', esc_html__( '<strong>ERROR</strong>: Invalid email address.', 'bbpress' ) );
        }

Attachments (1)

3210.diff (74.4 KB) - added by johnjamesjacoby 6 years ago.
Move many "ERROR" usages into 1

Download all attachments as: .zip

Change History (3)

#1 @johnjamesjacoby
6 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 2.6
  • Owner set to johnjamesjacoby
  • Version set to trunk

#2 @johnjamesjacoby
6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

In 6838:

Anonymous: Don't use esc_html__() in combination with HTML tags.

Props wpdennis. Fixes #3210.

@johnjamesjacoby
6 years ago

Move many "ERROR" usages into 1

Note: See TracTickets for help on using tickets.