localwiki/localwiki — comment on commit 042a48c53ef4126d79b5893d9c6e8ef028b287ed
File: sapling/pages/tests.py line 33
By philipn:

My motivation was that the Sacramento import was barfing on pagename reverses because a couple pages had a slash with spaces surrounding it.

According to http://en.m.wikipedia.org/wiki/Slash_(punctuation) you're right- slashes usually don't have spaces. They can occasionally (and "w/ thing" comes to mind) and folks have definitely made pages on daviswiki (and evidently on sacwiki) with spaced-slashes.

So one possible alternative would be to change the import to rename these pagenames. I think the current code is normalizing spaced-slashes to non-spaced.

The only thing that feels gross to me in this code is the use of the page URLs to decide whether to allow a pagename.

On Dec 11, 2011, at 12:01 AM, mivanov wrote:

> Why though? Normally a slash means either a) a namespaced page name, as in "Front Page/Talk" a la Davis Wiki or b) a normal slash as in "love/hate" and in both of these cases a space is unwanted. Or maybe add a test that makes more sense?
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/localwiki/localwiki/commit/042a48c53ef4126d79b5893d9c6e8ef028b287ed#commitcomment-784746