summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-03-24 21:51:31 +0000
committerDavid Robillard <d@drobilla.net>2013-03-24 21:51:31 +0000
commitf489d312420e63c7a1c54e364d368a8b93da06f3 (patch)
treefbf87fbd1aba3f7c0d17eeefb6e81c02cc48442a
parentb414f1636e78c8d18f90e14a152ab853cdb6e4e1 (diff)
downloadsratom-f489d312420e63c7a1c54e364d368a8b93da06f3.tar.gz
sratom-f489d312420e63c7a1c54e364d368a8b93da06f3.tar.bz2
sratom-f489d312420e63c7a1c54e364d368a8b93da06f3.zip
Escape invalid characters when writing paths as URIs.
git-svn-id: http://svn.drobilla.net/lad/trunk/sratom@5097 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--NEWS6
-rw-r--r--src/sratom.c4
-rw-r--r--wscript2
3 files changed, 9 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 50279a1..a6214d6 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+sratom (0.4.3) unstable;
+
+ * Escape invalid characters when writing paths as URIs
+
+ -- David Robillard <d@drobilla.net> Sun, 24 Mar 2013 17:51:07 -0400
+
sratom (0.4.2) stable;
* Fix serialisation of nested tuples
diff --git a/src/sratom.c b/src/sratom.c
index 78600a3..8c2249c 100644
--- a/src/sratom.c
+++ b/src/sratom.c
@@ -262,7 +262,7 @@ sratom_write(Sratom* sratom,
const uint8_t* str = USTR(body);
if (path_is_absolute((const char*)str)) {
new_node = true;
- object = serd_node_new_file_uri(str, NULL, NULL, false);
+ object = serd_node_new_file_uri(str, NULL, NULL, true);
} else {
SerdURI base_uri = SERD_URI_NULL;
if (!sratom->base_uri.buf ||
@@ -276,7 +276,7 @@ sratom_write(Sratom* sratom,
serd_uri_parse(sratom->base_uri.buf, &base_uri);
}
new_node = true;
- SerdNode rel = serd_node_new_file_uri(str, NULL, NULL, false);
+ SerdNode rel = serd_node_new_file_uri(str, NULL, NULL, true);
object = serd_node_new_uri_from_node(&rel, &base_uri, NULL);
serd_node_free(&rel);
}
diff --git a/wscript b/wscript
index e505e01..9e499e0 100644
--- a/wscript
+++ b/wscript
@@ -8,7 +8,7 @@ import waflib.extras.autowaf as autowaf
# major increment <=> incompatible changes
# minor increment <=> compatible changes (additions)
# micro increment <=> no interface changes
-SRATOM_VERSION = '0.4.2'
+SRATOM_VERSION = '0.4.3'
SRATOM_MAJOR_VERSION = '0'
# Mandatory waf variables