Skip to:
Content

bbPress.org

#3210 closed defect (fixed)

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

Reported by: wpdennis Owned by: 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 14 months ago.
Move many "ERROR" usages into 1

Download all attachments as: .zip

Change History (3)

#1 @johnjamesjacoby
14 months ago

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

#2 @johnjamesjacoby
14 months 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
14 months ago

Move many "ERROR" usages into 1

Note: See TracTickets for help on using tickets.