summaryrefslogtreecommitdiffstats
path: root/notify.pl
diff options
context:
space:
mode:
Diffstat (limited to 'notify.pl')
-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/&/&/g; # That could have been done better.
- $text =~ s/</&lt;/g;
- $text =~ s/>/&gt;/g;
- $text =~ s/'/&apos;/g;
+ encode_entities($text);
return $text;
}