Skip to:
Content

bbPress.org

Opened 8 years ago

Closed 8 years ago

#3210 closed defect (bug) (fixed)

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

Reported by: wpdennis Owned by: johnjamesjacoby
Priority: normal Milestone: 2.6
Component: API - Anonymous Posting Version: trunk
Severity: normal 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 8 years ago.
Move many "ERROR" usages into 1

Download all attachments as: .zip

Change History (3)

#1 @johnjamesjacoby
8 years ago

  • Keywords commit added
  • Milestone Awaiting Review2.6
  • Owner set to johnjamesjacoby
  • Versiontrunk

#2 @johnjamesjacoby
8 years ago

  • Resolutionfixed
  • Status newclosed

In 6838:

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

Props wpdennis. Fixes #3210.

@johnjamesjacoby
8 years ago

Move many "ERROR" usages into 1

Note: See TracTickets for help on using tickets.