aboutsummaryrefslogtreecommitdiff
path: root/src/ImagePreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ImagePreview.cpp')
-rw-r--r--src/ImagePreview.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ImagePreview.cpp b/src/ImagePreview.cpp
index 683bc1f..424aefa 100644
--- a/src/ImagePreview.cpp
+++ b/src/ImagePreview.cpp
@@ -73,9 +73,8 @@ namespace dchat
if(event.type == sf::Event::MouseButtonPressed && mouseInside && !imagePreviewUrl.empty())
{
// TODO: Implement for other platforms than linux
- std::string cmd = "xdg-open '";
- cmd += escapeCommand(imagePreviewUrl);
- cmd += "'";
+ std::string cmd = "xdg-open ";
+ cmd += escapeCommandArg(imagePreviewUrl);
printf("Clicked on web page preview, opening web page by running command: %s\n", cmd.c_str());
system(cmd.c_str());
}