X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.graph%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Frepresentation%2FTransferableGraphUtils.java;h=b0690532b85d584969526609181ba6fc712b5ba5;hp=10637ad65caf0d861d52e3d1adfffdee66d5f2ca;hb=da0a902de6b2b4c7b4b635d11b397f663db8ecd9;hpb=b913419ca9037bf9734c56a5f079024c3a1cd177 diff --git a/bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraphUtils.java b/bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraphUtils.java index 10637ad65..b0690532b 100644 --- a/bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraphUtils.java +++ b/bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraphUtils.java @@ -70,7 +70,7 @@ public class TransferableGraphUtils { if("http:/".equals(uri)) return identity; String[] tokens = uri.substring("http://".length()).split("/"); for(String token : tokens) { - identity = findExternalWithNameAndParent(tg, identity.resource, token); + identity = findExternalWithNameAndParent(tg, identity.resource, URIStringUtils.unescape(token)); if (identity == null) { return null; } @@ -301,14 +301,14 @@ public class TransferableGraphUtils { if(definition instanceof External) { External def = (External)definition; if(def.parent == -1) return "http:/"; - else return getURI(identities, def.parent) + "/" + def.name; + else return getURI(identities, def.parent) + "/" + URIStringUtils.escape(def.name); } else if(definition instanceof Root) { Root def = (Root)definition; if(def.name.isEmpty()) return "http:/"; return def.name; } else if (definition instanceof Internal) { Internal def = (Internal)definition; - return getURI(identities, def.parent) + "/" + def.name; + return getURI(identities, def.parent) + "/" + URIStringUtils.escape(def.name); } else { return ""; }