diff options
author | David Robillard <d@drobilla.net> | 2018-06-13 17:11:13 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-06-21 18:12:04 +0200 |
commit | 6fcf2dce8d519b4fee2b7b891e3710061cca981c (patch) | |
tree | 3997ea2ed4a86d4c94afe7147653e444903b7dd7 /src/node.c | |
parent | 9bbe2a22b4d8c320fc4d767b4b24d2b83270f6a5 (diff) | |
download | serd-6fcf2dce8d519b4fee2b7b891e3710061cca981c.tar.gz serd-6fcf2dce8d519b4fee2b7b891e3710061cca981c.tar.bz2 serd-6fcf2dce8d519b4fee2b7b891e3710061cca981c.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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -453,7 +453,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; @@ -474,7 +474,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 }; |