Mario-Leander Reimer wrote:
Hi Dave,

I encode the name because and did not want to restrict the user in any way regarding 
allowed characters for the "name" of an entity (which I use as node name) I 
store in JCR.
Otherwise I would have to manage 2 names, the "artificial" valid JCR node name and the 
"real name" for the entity the user initially entered, and keep both in-synch.
Same for nt:files a user can upload: a filename can start with a letter, the 
node name can't. So either strip the invalid characters and lose the original 
filename, or encode it somehow.

The node name can, I think.

So I figured it's best to always encode every name, not matter what. Well, now 
I additionally have to encode the XPath query.


This may be a bad idea, depending on the use case; for instance, when you allow WebDAV access to the store, people will only see the encoded names...

BR, Julian

Reply via email to