jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paco Avila <pav...@git.es>
Subject Re: Fofbidden characters in node names
Date Thu, 22 Mar 2007 17:33:00 GMT
El jue, 22-03-2007 a las 18:21 +0100, Julian Reschke escribió:
> Paco Avila schrieb:
> > El jue, 22-03-2007 a las 05:58 -0700, Michal Hybler escribió:
> >> Could someone tell me all characters which are forbidden in node names ....
> >> as " : etc. 
> > 
> > 
> > public static String escape(String name) {
> > 		log.debug("escape("+name+")");
> > 		String ret = name.replace('/', ' ');
> > 		ret = ret.replace(':', ' ');
> > 		ret = ret.replace('[', ' ');
> > 		ret = ret.replace(']', ' ');
> > 		ret = ret.replace('*', ' ');
> > 		ret = ret.replace('\'', ' ');
> > 		ret = ret.replace('"', ' ');
> > 		ret = ret.replace('|', ' ');
> > 		ret = ret.trim();
> > 		log.debug("escape: "+ret);
> > 		return ret;
> > 	}
> 
> Nit: I wouldn't call this method "escape", because it really doesn't 
> escape. Better to avoid confusion here :-)

I know. My initial try was to escape this chars, with no results :(

-- 
GIT Consultors S.L.
c\ Francesc Rover 2-B
07003 Palma de Mallorca
(Illes Balears)


Mime
View raw message