2008-07-25
svata
Hi,
I have used function cleanID() from /inc/pageutils.php with this results:
cleanID('a:b:start') = 'a:b:start'
cleanID('a:b:') = 'a:b'
Because of the fact, that both arguments are ID of the same page (the second is a shortcut of the first) I think, that the results should be the same, too.
There is the description of the function cleanID:
"Remove unwanted chars from ID.Cleans a given ID to only use allowed characters. Accented characters are converted to unaccented ones."
This function does something else, than it says: the ending colon of ID isn't an unwanted nor accented character and IMHO the function should not remove it from the result.
This behavior is done by the code:
129 $id = trim($id,':._-');
and I propose to change it like this:
129 $id = trim($id,'._-');
If you want to remove leading colon from ID, you can do it by this:
129 $id = trim($id,'._-');
130 $id = ltrim($id,':');
but i think it is not so important, because the leading colon doesn't change the sense of ID.
Bye
Svata