Skip to:
Content

bbPress.org

Opened 13 years ago

Closed 13 years ago

#2226 closed defect (bug) (fixed)

User Mention Doesn't Work With Non-Latin Usernames

Reported by: alex-ye's profile alex-ye Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.4 Priority: normal
Severity: normal Version: 2.2.3
Component: Component - Users Keywords: has-patch
Cc: wordpress@…, aliso

Description

WordPress provide the ability to overide the user name pattern to allow for non-Latin names .

So bbPress mention feature , should detect those changes or allow to provide a way to do it .

Attachments (2)

bbp_find_mentions.patch (597 bytes) - added by MZAWeb 13 years ago.
2226.02.patch (1.1 KB) - added by aliso 13 years ago.
Modified @MZAWeb's patch to put the filter on a returned value at the end of a function instead of putting the filter in the middle of an existing function.

Download all attachments as: .zip

Change History (8)

#1 follow-up: @johnjamesjacoby
13 years ago

  • Component changed from General to Users
  • Milestone changed from Awaiting Review to 2.4

Where and how exactly does WordPress allow a special case for this? For most user-facing things, we use user_login and/or user_nicename, and already hug closely to the core API's for doing anything with them.

Moving into 2.4, so we can look more into this sooner than later.

#2 in reply to: ↑ 1 @alex-ye
13 years ago

Replying to johnjamesjacoby:

Where and how exactly does WordPress allow a special case for this?

It's possible by filtering sanitize_user function , see :
http://wordpress.org/extend/plugins/wordpress-special-characters-in-usernames/


For most user-facing things, we use user_login and/or user_nicename, and already hug closely to the core API's for doing anything with them.

There are no must , If you don't know many websites work on this behivor since a long time , What I want from bbPress is to provide a hook to change the regix that used to detect the user names .

#3 @MZAWeb
13 years ago

  • Cc wordpress@… added

I think a filter here is a good idea, regardless if we plan to make this work for non-latin in core. Patch added.

#4 @alex-ye
13 years ago

  • Keywords has-patch added; needs-patch removed

I think @MZAWeb patch is good :)

@aliso
13 years ago

Modified @MZAWeb's patch to put the filter on a returned value at the end of a function instead of putting the filter in the middle of an existing function.

#5 @aliso
13 years ago

  • Cc aliso added

#6 @johnjamesjacoby
13 years ago

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

In 4998:

Introduce bbp_find_mentions_pattern() function to make it easier to change the pattern to match usernames against. Helpful for non-latin characters. Also add additional filter to bbp_find_mentions() to allow for late filtering of results. Props aliso. Fixes #2226.

Note: See TracTickets for help on using tickets.