aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-06-13 17:11:13 -0400
committerDavid Robillard <d@drobilla.net>2020-10-27 13:13:58 +0100
commit93e54363f5ae251acee94051f77305f60f0158c8 (patch)
tree3fc4e6166ba3d4525446a046a237b66fc9b0c134 /src/node.c
parent06b775c1de2173720fe12abec2fbe225c353a12b (diff)
downloadserd-93e54363f5ae251acee94051f77305f60f0158c8.tar.gz
serd-93e54363f5ae251acee94051f77305f60f0158c8.tar.bz2
serd-93e54363f5ae251acee94051f77305f60f0158c8.zip
Remove escape parameter from serd_new_file_uri
Since characters are escaped because they are not valid characters in a URI, any use of this function without escaping is problematic at best.
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node.c b/src/node.c
index cbad34bf..cc11fadc 100644
--- a/src/node.c
+++ b/src/node.c
@@ -455,7 +455,7 @@ is_uri_path_char(const char c)
}
SerdNode*
-serd_new_file_uri(const char* path, const char* hostname, bool escape)
+serd_new_file_uri(const char* path, const char* hostname)
{
const size_t path_len = strlen(path);
const size_t hostname_len = hostname ? strlen(hostname) : 0;
@@ -476,7 +476,7 @@ serd_new_file_uri(const char* path, const char* hostname, bool escape)
serd_buffer_sink("/", 1, 1, &buffer);
} else if (path[i] == '%') {
serd_buffer_sink("%%", 1, 2, &buffer);
- } else if (!escape || is_uri_path_char(path[i])) {
+ } else if (is_uri_path_char(path[i])) {
serd_buffer_sink(path + i, 1, 1, &buffer);
} else {
char escape_str[4] = { '%', 0, 0, 0 };