summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2011-01-19 01:32:56 +0000
committerPaul W. Frields <stickster@gmail.com>2011-01-19 01:32:56 +0000
commit9ce241ef637f2a35adc77a12f1273dfa77a1b3c8 (patch)
treeff9a11b05a3bb1ccc3345f020ec19716efb4ea90
parent18db1f2c01680a73d84c0f32d01dc1dc3cc72ec7 (diff)
downloadirssi-notify-9ce241ef637f2a35adc77a12f1273dfa77a1b3c8.tar.gz
irssi-notify-9ce241ef637f2a35adc77a12f1273dfa77a1b3c8.tar.xz
irssi-notify-9ce241ef637f2a35adc77a12f1273dfa77a1b3c8.zip
Use HTML::Entities
git-svn-id: https://irssi-libnotify.googlecode.com/svn/trunk@34 291cbfae-0d27-0410-99d7-557b17e6fe3d
-rw-r--r--notify.pl6
1 files changed, 2 insertions, 4 deletions
diff --git a/notify.pl b/notify.pl
index 2d797f2..1178307 100644
--- a/notify.pl
+++ b/notify.pl
@@ -8,6 +8,7 @@
use strict;
use Irssi;
use vars qw($VERSION %IRSSI);
+use HTML::Entities;
$VERSION = "0.01";
%IRSSI = (
@@ -24,10 +25,7 @@ Irssi::settings_add_str('notify', 'notify_time', '5000');
sub sanitize {
my ($text) = @_;
- $text =~ s/&/&amp;/g; # That could have been done better.
- $text =~ s/</&lt;/g;
- $text =~ s/>/&gt;/g;
- $text =~ s/'/&apos;/g;
+ encode_entities($text);
return $text;
}