[vlc-devel] [PATCH] Parse square brackets in pathnames - ticket #20384
Cristiano Milia
chainofflowers at gmx.net
Sun Apr 29 00:37:58 CEST 2018
When opening a M3U playlist containing relative pathnames, the songs
whose pathname contains a square bracket are simply ignored.
This patch makes vlc_uri_component_validate consider [] as valid
parts of pathnames.
---
src/text/url.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/text/url.c b/src/text/url.c
index 1c86bedb58..65406965e9 100644
--- a/src/text/url.c
+++ b/src/text/url.c
@@ -398,7 +398,7 @@ static bool vlc_uri_host_validate(const char *str)
static bool vlc_uri_path_validate(const char *str)
{
- return vlc_uri_component_validate(str, "/@:");
+ return vlc_uri_component_validate(str, "/@:[]");
}
static int vlc_UrlParseInner(vlc_url_t *restrict url, const char *str)
@@ -570,7 +570,7 @@ int vlc_UrlParseFixup(vlc_url_t *url, const char *str)
{
int ret = vlc_UrlParseInner(url, str);
- static const char pathextras[] = "/@:";
+ static const char pathextras[] = "/@:[]";
if (url->psz_path != NULL
&& !vlc_uri_component_validate(url->psz_path, pathextras))
--
2.17.0
More information about the vlc-devel
mailing list