Dan - I don't understand all the implication for fixing names. Why don't you just use a configurable preg_replace pattern for valid pagenames? I know you are much more comfortable using str_replace, but the solution with it are getting more complicated and harder to maintain stability in development.
Then one has one pattern for valid page names, and another configurable preg_replace pattern for creating new page names, i.e. transforming unwanted characters, introducing other ones, fixing case etc. Same for character transformation. You can see an example of patterns at http://www.pmwiki.org/wiki/Cookbook/ISO8859MakePageNamePatterns I do find PmWiki's approach using an array of patterns for making page names a lot more flexible than what you suggest. There is a configurable $MakePageNamePatterns array, and a preg_replace for th ename transformation: $name = preg_replace(array_keys($MakePageNamePatterns), array_values($MakePageNamePatterns), $m[1]); (see function MakePageName for details) You split the name by the dots, and apply the preg_replace to every name part. Anyway, perhaps you have your reasons for speed sake, but the cost is flexibility, i think. Maybe i am wrong on this! cheers, ~Hans --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BoltWire" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/boltwire?hl=en -~----------~----~----~----~------~----~------~--~---
