Make WordPress Core

Opened 6 years ago

Last modified 6 years ago

#43626 new defect (bug)

Searching for tags using slugs work for English but does not work for Arabic

Reported by: ehabsan's profile ehabsan Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.4
Component: Taxonomy Keywords:
Focuses: Cc:


If i have created a tag with name: tag1 and slug: slug1 then searching for slug1 will return tag1 in the results, if i do the same thing but with Arabic then tag1 will not be returned.

Which means that searching for tags using slugs work for English but not for Arabic - probably for all other languages that don't use English characters

Here is how to reproduce the bug
1) create a new tag: name: tag1, slug: slug1
2) create a new tag: name: تاج1, slug:سلج1
3) search for tags using "slug1" phrase => tag1 will be in the results
4)search for tags using "سلج1" phrase => تاج1 will not be in the results

I have done the previous steps in a fresh installation of WordPress.

Change History (4)

#1 @tobifjellner
6 years ago

What happens if you search for the URLEncoded slug "%D8%B3%D9%84%D8%AC1"?

#2 @ehabsan
6 years ago

Searching using the encoded slug actually worked :) that means a fix would be to encode the text before searching

#3 follow-up: @tobifjellner
6 years ago

Well. The tricky thing is that mostly people will be searching not for slugs, but rather for content... :)

#4 in reply to: ↑ 3 @ehabsan
6 years ago

I agree but i still think that in certain cases searching for the slug can be really useful, anyway since the fix seems to be quite easy i think it is worth fixing it.

Note: See TracTickets for help on using tickets.