couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <...@apache.org>
Subject Re: Spaces in View Names
Date Mon, 14 Feb 2011 16:10:23 GMT
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
-- 




Mime
View raw message