Add a function for URL encoding file paths

This commit is contained in:
Robbert van der Helm
2021-07-11 17:17:57 +02:00
parent 64fbabd8ce
commit 83951200bb
2 changed files with 79 additions and 0 deletions
+6
View File
@@ -133,6 +133,12 @@ bool is_watchdog_timer_disabled();
*/
bool pid_running(pid_t pid);
/**
* URL encode a file path. We won't escape forward slashes, and `path` should
* not yet include the `file://` prefix.
*/
std::string url_encode_path(std::string path);
/**
* Escape XML entities within a string. Used inside of desktop notifications.
*/