summaryrefslogtreecommitdiff
path: root/libs/ardour/utils.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-03-17 12:52:49 -0400
committerDavid Robillard <d@drobilla.net>2013-03-17 12:52:49 -0400
commit07112b55e0bb7ceb9e5c05ab4df167ecaf7edd9b (patch)
treea5f55e221629394096734204f568c592c6cfd58f /libs/ardour/utils.cc
parent2233e91086c01eeaf4d023db4e305944bc4565e6 (diff)
Save LV2 presets with relative URIs to their own bundle, in the same style as Jalv.
Diffstat (limited to 'libs/ardour/utils.cc')
-rw-r--r--libs/ardour/utils.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc
index d034eea6ee..ad0823ddaf 100644
--- a/libs/ardour/utils.cc
+++ b/libs/ardour/utils.cc
@@ -111,6 +111,17 @@ legalize_for_universal_path (const string& str)
return replace_chars (str, "<>:\"/\\|?*");
}
+/** Legalize for a URI path component. This is like
+ * legalize_for_universal_path, but stricter, disallowing spaces and hash.
+ * This avoids %20 escapes in URIs, but probably needs work to be more strictly
+ * correct.
+ */
+string
+legalize_for_uri (const string& str)
+{
+ return replace_chars (str, "<>:\"/\\|?* #");
+}
+
/** take an arbitrary string as an argument, and return a version of it
* suitable for use as a path (directory/folder name). This is the Ardour 2.X
* version of this code, which used an approach that came to be seen as