diff options
author | mathieui <mathieui@mathieui.net> | 2012-03-30 02:43:43 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2012-03-30 02:43:43 +0200 |
commit | 12e6de0cdcf5f3cda318283c7c20402b9615824d (patch) | |
tree | c0715d24afb6afc344a8df644da876ceddef9c81 /plugins | |
parent | 0dc819b9ce4067f006f099511e06e0666164c7e8 (diff) | |
download | poezio-12e6de0cdcf5f3cda318283c7c20402b9615824d.tar.gz poezio-12e6de0cdcf5f3cda318283c7c20402b9615824d.tar.bz2 poezio-12e6de0cdcf5f3cda318283c7c20402b9615824d.tar.xz poezio-12e6de0cdcf5f3cda318283c7c20402b9615824d.zip |
Fixes #2348
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/link.py | 5 |
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') |