We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88d32a7 commit 906c74fCopy full SHA for 906c74f
plugins/link.py
@@ -7,6 +7,7 @@
7
from xhtml import clean_text
8
import common
9
import tabs
10
+import pipes
11
12
url_pattern = re.compile(r'\b(http[s]?://(?:\S+))\b', re.I|re.U)
13
@@ -41,8 +42,7 @@ def command_link(self, args):
41
42
nb = 1
43
link = self.find_link(nb)
44
if link:
- link = re.sub("'", "\\'", link)
45
- link = re.sub('"', '\\"', link)
+ link = pipes.quote(link)
46
self.core.exec_command("%s %s" % (self.config.get('browser', 'firefox'), link))
47
else:
48
self.core.information('No URL found.', 'Warning')
0 commit comments