Closed (fixed)
Project:
Pathauto
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
30 Jun 2010 at 16:31 UTC
Updated:
19 Jul 2010 at 16:00 UTC
Jump to comment: Most recent file
There's some new changes in D7's truncate_utf8() function that uses a more advanced truncation method. We should update our method to synchronize with it. And we can add some unit tests for the function.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 841808-pathauto-backport-trunateuf8.patch | 11.69 KB | dave reid |
| #6 | 841808-pathauto-backport-trunateuf8.patch | 8.9 KB | dave reid |
| #2 | 841808-pathauto-remove-truncate-chars-D7.patch | 2.49 KB | dave reid |
Comments
Comment #1
dave reidActually, we can just replace _pathauto_truncate_chars() to use truncate_utf8() itself! The D7 version of the function has been improved and works just great with URL aliases.
Comment #2
dave reidPatch for review.
Comment #3
gregglesafaik truncate_utf8 in d7 core was worked on by Freso because of his frustration with how the D7 version worked for the needs of Pathauto. It's not surprising that it's so easy to flip them out.
Though I haven't tested it, makes sense to me.
Comment #4
dave reidTested thoroughly here and it's working great. Committing to CVS!
http://drupal.org/cvs?commit=388256
Comment #5
dave reidIdeally I'd like to backport this to 6.x-2.x as well.
Comment #6
dave reidPatch backporting the truncate_utf8() to D6.
Comment #7
dave reidPatch including tests
Comment #8
dave reidPatch passes tests, so committing to CVS.
http://drupal.org/cvs?commit=388278