1) modify xowiki view method to generate the links by urlencoding the name before making the link
2) modify xowiki make_link method to urlencode the name. THis is only safe if we can be assured only the name and not a path is passed in for the link
3) disallow ? in page names with javascript validation and backend cleanup if necessary.
I recommend A-Z 0-9 _
We have Title for the pretty name and most generated pretty urls are safely created instead of urlencoded.
I prefer #3.