-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Daniel Friesen wrote:
The issue was on prefixes...
"Test_" was showing things like "TestMan".
I noted a way to fix that on the bug's page. Append a single character
to the title, and then strip it off once you have the key.
Using '.' in this case.
substr( ...titleToKey($text.'.'), 0, -1 );
Because the . is appended to the title "test_" will be normalized to the
db key "Test_." and then we strip off the . and end up with "Test_".
It's basically a placeholder character saying "Hey, I'm sitting here
representing the rest of the title... don't strip what's beside me!",
then we get rid of it when done.
That feels a little icky to me. :)
What I might recommend is having a couple of steps to the normalization:
1) Normalization of partial titles
...may end with / or whitespace or otherwise not be quite 100% a valid
title... for use in normalizing things to go into searches, prefix
searches, etc.
2) Complete title normalization
Finish that off with right-side trims, enforce length limits, etc.
- -- brion
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iEYEARECAAYFAkiy7PAACgkQwRnhpk1wk45g9gCgnMNUQLGdSYBkiQlP93IRU3pM
vCQAoIg8ekHARGoyjlEuaeob/KS24q0k
=X6OU
-----END PGP SIGNATURE-----