Badly truncated slugs in posts with similar, long non-latin titles
|Reported by:||nevma||Owned by:||SergeyBiryukov|
|Component:||Permalinks||Keywords:||has-patch 3.6-early commit|
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 — 3 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 3.5
comment:7 follow-up: ↓ 8 @SergeyBiryukov — 3 years ago
comment:15 @SergeyBiryukov — 2 years ago
- Keywords commit added
comment:17 @SergeyBiryukov — 2 years ago
- Keywords 3.6-early added; early punt removed
- Milestone changed from 3.5 to Future Release
comment:19 @SergeyBiryukov — 2 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed