summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-03-30 02:43:43 +0200
committermathieui <mathieui@mathieui.net>2012-03-30 02:43:43 +0200
commit12e6de0cdcf5f3cda318283c7c20402b9615824d (patch)
treec0715d24afb6afc344a8df644da876ceddef9c81
parent0dc819b9ce4067f006f099511e06e0666164c7e8 (diff)
downloadpoezio-12e6de0cdcf5f3cda318283c7c20402b9615824d.tar.gz
poezio-12e6de0cdcf5f3cda318283c7c20402b9615824d.tar.bz2
poezio-12e6de0cdcf5f3cda318283c7c20402b9615824d.tar.xz
poezio-12e6de0cdcf5f3cda318283c7c20402b9615824d.zip
Fixes #2348
-rw-r--r--plugins/link.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/link.py b/plugins/link.py
index 8ef52982..2fcf9ddd 100644
--- a/plugins/link.py
+++ b/plugins/link.py
@@ -1,7 +1,6 @@
# A plugin that adds the /link command, letting you open links that are pasted
# in the conversation, without having to click them.
-import os
import re
from plugin import BasePlugin, PluginConfig
@@ -39,7 +38,9 @@ class Plugin(BasePlugin):
nb = 1
link = self.find_link(nb)
if link:
- self.core.exec_command('%s %s' % (self.config.get('browser', 'firefox'), link))
+ link = re.sub("'", "\\'", link)
+ link = re.sub('"', '\\"', link)
+ self.core.exec_command("%s %s" % (self.config.get('browser', 'firefox'), link))
else:
self.core.information('No URL found.', 'Warning')