eye icon indicating copy to clipboard operation
eye copied to clipboard

`string` operations not escaped properly

Open jeswr opened this issue 10 months ago • 1 comments

With the following ask.n3

@prefix : <http://example.org/> .
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
@prefix string: <http://www.w3.org/2000/10/swap/string#>.

{
    ({ <http://example.org/> <http://example.org/> "1" }) string:concatenation ?Y .
} log:query {
    "a" :tested ?Y .
} .

Running eye --nope --quiet --query ./ask.n3

Results in the following invalid n3 document (the quotations around the 1 should be escaped, and I'm not sure if the multiline string is valid either.

@prefix : <http://example.org/>.

"a" :tested "{
    <http://example.org/> <http://example.org/> "1".
}".

jeswr avatar Apr 12 '24 14:04 jeswr

EYE v10.2.13 (2024-04-12) now gives

@prefix : <http://example.org/>.

"a" :tested "{\n    <http://example.org/> <http://example.org/> \"1\".\n}".

josd avatar Apr 12 '24 20:04 josd