WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#13036 closed defect (bug) (fixed)

comment_form incorrectly includes </p> in translatable string

Reported by: chrisjean Owned by: nbachiyski
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: I18N Keywords: has-patch test commit
Focuses: Cc:
PR Number:

Description

The logged_in_as string in the comment_form function incorrectly includes the </p> tag as can be seen below:

'<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%s">%s</a>. <a href="%s" title="Log out of this account">Log out?</a></p>' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) )

This patch moves the closing tag outside of the translate string by appending it afterwords:

'<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%s">%s</a>. <a href="%s" title="Log out of this account">Log out?</a>' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>'

Attachments (1)

13036.diff (1.7 KB) - added by chrisbliss18 10 years ago.

Download all attachments as: .zip

Change History (3)

@chrisbliss18
10 years ago

#1 @nacin
10 years ago

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

(In [14119]) Move stray closing p tag out of a translation. props chrisbliss18, fixes #13036.

#2 @nacin
10 years ago

  • Milestone changed from Unassigned to 3.0
Note: See TracTickets for help on using tickets.