[wp-trac] [WordPress Trac] #50924: Do not use ZWNJ and ZWJ in post name (slug and url)
WordPress Trac
noreply at wordpress.org
Wed Aug 12 06:27:32 UTC 2020
#50924: Do not use ZWNJ and ZWJ in post name (slug and url)
-----------------------------+-----------------------------
Reporter: behzadian | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: I18N | Version: 5.5
Severity: normal | Keywords: 2nd-opinion
Focuses: |
-----------------------------+-----------------------------
If I use Zero Width Non Joiner char in post title (and post title will be
used for post slug and name as default), url will be ugly.
ZWNJ is a character used to split two words without real space, for
example I in work (پیامکها) there is a ZWNJ between (پیامک) and (ها). If
I remove ZWNJ, it will be "پیامکها" which is wrong in Persian (and similar
languages). Now if I use ZWNJ in slug, makes url so ugly, for example
"/پیامک%e2%80%8cها/".
I changed `function remove_accents( $string )` and add two replacement as
below:
`
// Grave accent.
'Ǜ' => 'U',
'ǜ' => 'u',
// Persian.
'' => '-', //added
'' => '-', //added
`
to replace these chars to space
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50924>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list