Needed to call escapeHTML to properly escape things like spaces in
authorAndrew DeFaria <Andrew@DeFaria.com>
Sun, 17 Nov 2013 03:54:39 +0000 (19:54 -0800)
committerAndrew DeFaria <Andrew@DeFaria.com>
Sun, 17 Nov 2013 03:54:39 +0000 (19:54 -0800)
filepath names to things like "Dropbox/Camera Uploads"

bin/setbg

index 3f9aa82..e3f5a46 100755 (executable)
--- a/bin/setbg
+++ b/bin/setbg
@@ -57,6 +57,7 @@ use warnings;
 use FindBin;
 use Getopt::Long;
 use Proc::ProcessTable;
+use CGI qw/:standard/;
 
 use lib "$FindBin::Bin/../lib";
 
@@ -123,7 +124,7 @@ my $debugger = $DB::OUT;
 EnterDaemonMode unless defined $DB::OUT;
 
 while () {
-  my $image = $images[int (rand $#images)];
+  my $image = escapeHTML ($images[int (rand $#images)]);
 
   open my $log, '>', "$ENV{HOME}/.$FindBin::Script"
     or error "Unable to open $ENV{HOME}/.setbg for writing - $!", 1;