#2821 closed defect (bug) (fixed)
Plugin Directory: Plugin slug should be Latin Characters Only
Reported by: | Ipstenu | Owned by: | tellyworth |
---|---|---|---|
Milestone: | Plugin Directory v3.0 | Priority: | normal |
Component: | Plugin Directory | Keywords: | has-patch has-screenshots |
Cc: |
Description
As much as it pains me to say this, due to integration with SVN and other tools, it's safest to keep our slugs using non-accented characters (à or ñ or œ and so on).
We can manually fix it but we should automate that.
Attachments (3)
Change History (10)
#2
@
7 years ago
We need to block those too :( It does weird things if we use non ... boring English (I'm sleepy and I can't remember the right word for non-accented English characters)
#3
@
7 years ago
- Keywords has-screenshots added
In 2821.2.patch:
- Run the plugin name through
remove_accents()
. - Strip any non-ASCII characters.
- Run the rest through
sanitize_title_with_dashes()
.
If the slug turns out to be empty, an error message is displayed:
The plugin has an unsupported name. Plugin names can only contain latin letters (A-z), numbers, spaces, and hyphens. Please change the
Plugin Name:
line in your main plugin file and upload it again.
Suggestions for better text welcome :)
2821.patch replaces
sanitize_title_with_dashes()
withsanitize_title()
, which includesremove_accents()
.This doesn't cover Cyrillic/Arabic/Hebrew/Japanese characters — do we need to block those as well, or removing accents would be good enough for now?