summaryrefslogtreecommitdiff
path: root/src/ntriples_parse.c
diff options
context:
space:
mode:
authorDave Beckett <dave@dajobe.org>2013-12-29 20:33:51 -0800
committerDave Beckett <dave@dajobe.org>2013-12-29 20:36:20 -0800
commita9285f87b19bf3a8a855358da1bfadf97b3f25c2 (patch)
treebd483aa8144490186d5f236758e2989b478c28bb /src/ntriples_parse.c
parent5365ad0fbf6df7ed8a200bc383d8e3e90daf3b47 (diff)
downloadraptor-a9285f87b19bf3a8a855358da1bfadf97b3f25c2.tar.gz
Allow ' in <URI>
Fixes Issue #0000562 http://bugs.librdf.org/mantis/view.php?id=562
Diffstat (limited to 'src/ntriples_parse.c')
-rw-r--r--src/ntriples_parse.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ntriples_parse.c b/src/ntriples_parse.c
index 47524bad..781681e4 100644
--- a/src/ntriples_parse.c
+++ b/src/ntriples_parse.c
@@ -442,6 +442,7 @@ raptor_ntriples_parse_chunk(raptor_parser* rdf_parser,
if(1) {
int quote = '\0';
+ int in_uri = '\0';
int bq = 0;
while(ptr < end_ptr) {
if(!bq) {
@@ -451,8 +452,13 @@ raptor_ntriples_parse_chunk(raptor_parser* rdf_parser,
continue;
}
+ if(*ptr == '<')
+ in_uri = 1;
+ else if (in_uri && *ptr == '>')
+ in_uri = 0;
+
if(!quote) {
- if(*ptr == '\'' || *ptr == '"')
+ if((!in_uri && *ptr == '\'') || *ptr == '"')
quote = *ptr;
if(*ptr == '\n' || *ptr == '\r')
break;