How to sanitize JCR node names ?
I want to create a node but I get Invalid name or path exception while creating a node, below is the exception
javax.jcr.RepositoryException: Invalid name or path: parentCategoty/tco[a].jpg
Hence I am using JcrUtil.escapeIllegalJcrChars to sanitize the path before creating but it seems not working.
JcrUtil.createPath(JcrUtil.escapeIllegalJcrChars("parentCategoty/tco[a].jpg"),JcrConstants.NT_UNSTRUCTURED, session);
Can you tell me what could be the problem ? Also is there any other API that will check the path give whether the path is valid or not, basically I don't want to get the exceltopn instead i want to put all invalid path in a collection. Is this possible ?