mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Escape spaces in URI encoding
This commit is contained in:
@@ -103,6 +103,11 @@ std::string url_encode_path(std::string path) {
|
|||||||
static_cast<size_t>(static_cast<double>(path.size()) * 1.1));
|
static_cast<size_t>(static_cast<double>(path.size()) * 1.1));
|
||||||
for (const char& character : path) {
|
for (const char& character : path) {
|
||||||
switch (character) {
|
switch (character) {
|
||||||
|
// Spaces are somehow in the above list, but Bitwig Studio requires
|
||||||
|
// spaces to be escaped in the `text/uri-list` format
|
||||||
|
case ' ':
|
||||||
|
escaped.append("%20");
|
||||||
|
break;
|
||||||
case '!':
|
case '!':
|
||||||
escaped.append("%21");
|
escaped.append("%21");
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user