diff --git a/vault-core/src/main/java/org/apache/jackrabbit/vault/util/PlatformNameFormat.java b/vault-core/src/main/java/org/apache/jackrabbit/vault/util/PlatformNameFormat.java index 55d1683..b02554f 100644 --- a/vault-core/src/main/java/org/apache/jackrabbit/vault/util/PlatformNameFormat.java +++ b/vault-core/src/main/java/org/apache/jackrabbit/vault/util/PlatformNameFormat.java @@ -17,14 +17,16 @@ package org.apache.jackrabbit.vault.util; +import org.apache.jackrabbit.commons.JcrUtils; + /** * Implements a repository to platform name formatter. * *

Illegal characters a * generally escaped using the url escaping format, i.e. replacing the char - * by a '%' hex(char) sequence. special treatment is used for the ':' char - * since it's used quite often as namespace prefix separator. the - * PREFIX ':' NAME sequence is replaced by '_' PREFIX '_' NAME. item names + * by a '%' hex(char) sequence. Special treatment is used for the ':' char + * since it's used quite often as namespace prefix separator. The + * PREFIX ':' NAME sequence is replaced by '_' PREFIX '_' NAME. Item names * that would generate the same pattern are escaped with an extra leading '_'. * *

Examples: @@ -47,7 +49,7 @@ * +-------------------+----------------------+----+----+ * * - * note for the 2nd set of examples the cases are very rare and justify the + * Note for the 2nd set of examples the cases are very rare and justify the * ugly '%' escaping. * */ @@ -80,6 +82,7 @@ buf.append('_'); } else { buf.append("%3a"); + escapeColon = true; } break; case '_':