aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/node.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/node.c b/src/node.c
index 1644b6fc..fce2b4cb 100644
--- a/src/node.c
+++ b/src/node.c
@@ -139,7 +139,8 @@ SERD_API
SerdNode
serd_node_new_file_uri(const uint8_t* path,
const uint8_t* hostname,
- SerdURI* out)
+ SerdURI* out,
+ bool escape)
{
const size_t path_len = strlen((const char*)path);
const size_t hostname_len = hostname ? strlen((const char*)hostname) : 0;
@@ -161,7 +162,7 @@ serd_node_new_file_uri(const uint8_t* path,
serd_chunk_sink("/", 1, &chunk);
} else if (path[i] == '%') {
serd_chunk_sink("%%", 2, &chunk);
- } else if (is_uri_path_char(path[i])) {
+ } else if (!escape || is_uri_path_char(path[i])) {
serd_chunk_sink(path + i, 1, &chunk);
} else {
char escape[4] = { '%', 0, 0, 0 };