]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
Quote message before passing to shell
authorTrevor Slocum <redacted>
Tue, 26 Apr 2016 02:51:28 +0000 (19:51 -0700)
committerTrevor Slocum <redacted>
Tue, 26 Apr 2016 02:51:28 +0000 (19:51 -0700)
scripts/hilightcmd.pl

index a234082178382b28450287280ca5d55970a93d6a..c2c829577a6d3e1f2c4d46d0203c2ca4d42b83de 100644 (file)
@@ -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
         ));
     }
 });
git clone https://git.99rst.org/PROJECT