jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Reschke <julian.resc...@gmx.de>
Subject Re: Fofbidden characters in node names
Date Thu, 22 Mar 2007 17:21:07 GMT
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 :-)

Best regards, Julian


Mime
View raw message