Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,17 @@ public ListQueryBuilder process(Request request, ListQueryBuilder builder,

private static RDFNode asValue(String value, String type, String valueBase) {
if (valueBase != null && ! NameUtils.isURI(value)) {
value = NameUtils.ensureLastSlash(valueBase) + value;
value = NameUtils.ensureLastSlash(valueBase) + sanitiseURI(value);
}
// TODO have a configurable default language, currently this will default to "@en"
return TypeUtil.asTypedValue(value, type);
}

// Remove characters in URI stub that Jena fails to escape in Sparql serialisation
private static String sanitiseURI(String value) {
return value.replace("<", "%36")
.replace(">", "%3E")
.replace("'", "%27");
}

}
Loading