Badly truncated slugs in posts with similar, long non-latin titles
|Reported by:||nevma||Owned by:||SergeyBiryukov|
|Severity:||normal||Keywords:||has-patch 3.6-early commit|
|Cc:||rfair404, meloniq@…, nashwan.doaqan@…|
When WP automatically generates a slug for a post with non-latin title AND a number has to be appended to the slug to avoid duplicate slugs, then the resulting slug may be badly truncated.
To reproduce the problem:
Create and publish a post with this title (without the quotes): "Αρνάκι άσπρο και παχύ της μάνας του καμάρι"
Create and publish another one with this title (without the quotes): "Αρνάκι άσπρο και παχύ της μάνας του καμάρι, και άλλα τραγούδια"
In both cases, let WP create the slug.
You will see that the second slug is broken and the URL results in a 404 error.
It seems that, in this scenario, WP does not take into account the fact that the new slug may contain url-encoded characters from multibyte character sets, when truncating it.
Change History (33)
comment:3 SergeyBiryukov — 18 months ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 3.5
comment:5 SergeyBiryukov — 18 months ago
comment:7 follow-up: ↓ 8 SergeyBiryukov — 18 months ago
- Keywords commit added
- Keywords 3.6-early added; early punt removed
- Milestone changed from 3.5 to Future Release
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed