You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just as literals must be escaped to be represented as valid RDF strings, URIs must also be escaped.
Consider making the following change:
def format_uri(uri, options = {})
"<%s>" % escaped(uri_for(uri))
end
Here are specs I've used:
describe "utf-8 escaped" do
{
%(http://a/D%C3%BCrst) => %(<http://a/D%C3%BCrst>),
%(http://a/D\u00FCrst) => %(<http://a/D\\u00FCrst>),
%(http://b/Dürst) => %(<http://b/D\\u00FCrst>),
%(http://a/\u{15678}another) => %(<http://a/\\U00015678another>),
}.each_pair do |uri, dump|
it "should dump #{uri} as #{dump}" do
RDF::URI.new(uri).to_ntriples.should == dump
end
end
end
The text was updated successfully, but these errors were encountered:
Just as literals must be escaped to be represented as valid RDF strings, URIs must also be escaped.
Consider making the following change:
Here are specs I've used:
The text was updated successfully, but these errors were encountered: