From 12e6de0cdcf5f3cda318283c7c20402b9615824d Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 30 Mar 2012 02:43:43 +0200 Subject: Fixes #2348 --- plugins/link.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/link.py') 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') -- cgit v1.2.3