If there's a use case for including spaces in view names (I haven't thought of one yet) we could meet that while avoiding whitespace-only names and other tricky issues by trimming leading and trailing spaces before creation.
On Mon, Feb 14, 2011 at 11:10 AM, Jan Lehnardt <j...@apache.org> wrote: > Hi Benjamin, > > On 14 Feb 2011, at 16:52, Benjamin Young wrote: > >> Hi all, >> >> It's currently possible to include space characters in View names, so your >> map/reduce URL can (actually) look like this: >> /db/_design/app/_view/ >> (there are 5 spaces at the end of that partial "URL") >> >> Encoded it would look like this: >> /db/_design/app/_view/%20%20%20%20%20 >> >> Needless to say this could be potentially quite confusing--though I suppose >> we could consider it an obfuscation option. :/ >> >> Should this be considered a "bug" and avoided in future views? or just >> considered an option that one should be careful when using? >> >> This came to my attention as Futon currently adds %20's to the names when >> displayed in dropdowns. Futon2, however, doesn't currently do that--making >> it nearly impossible to click the name of the view above--it at least looks >> like a bug in the UI. >> >> Additionally, when editing documents with a view named with all spaces, the >> keys are displayed as un-viewable whitespace until you edit that chunk. In >> Futon2 it's currently impossible to edit that piece of the document (as you >> can't click it). >> >> As I'm working on Futon2, I'm wanting to determine what's the best way to >> handle spaces in view names. Should they be removed as an option for that >> portion of the URL going forward? Should Futon2 escape them in any visual >> reference to them (as Futon1 currently does in most cases)? >> >> Just wanted to get some discussion on this before I picked a way forward. :) > > Thanks for bringing this up. I think we should not allow spaces in view names. > > Cheers > Jan > -- > > > >