diff options
| author | Trevor Slocum | 2016-04-25 19:51:28 -0700 |
|---|---|---|
| committer | Trevor Slocum | 2016-04-25 19:51:28 -0700 |
| commit | fa39bc3a92fd2a8b7efdcbb7ae326e3227a9e4f3 (patch) | |
| tree | d5b4aaaf58c3374c01ca7350e8040a4857322fbf /scripts | |
| parent | 39e19c5e9dedd38aaf23ff5cc11d014108175a1b (diff) | |
| download | scripts.irssi.org-fa39bc3a92fd2a8b7efdcbb7ae326e3227a9e4f3.tar.bz2 | |
Quote message before passing to shell
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/hilightcmd.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/hilightcmd.pl b/scripts/hilightcmd.pl index a234082..c2c8295 100644 --- a/scripts/hilightcmd.pl +++ b/scripts/hilightcmd.pl @@ -12,6 +12,7 @@ use Irssi; use POSIX; use vars qw($VERSION %IRSSI); use Text::Sprintf::Named qw(named_sprintf); +use String::ShellQuote qw(shell_quote_best_effort); $VERSION = "0.1"; %IRSSI = (authors => "Guillaume Gelin", @@ -38,7 +39,7 @@ Irssi::signal_add('print text' => sub { $stripped =~ s/"/\\"/g; system(named_sprintf( Irssi::settings_get_str('hilightcmd_systemcmd'), - message => $stripped + message => shell_quote_best_effort $stripped )); } }); |
