From 9ce241ef637f2a35adc77a12f1273dfa77a1b3c8 Mon Sep 17 00:00:00 2001 From: "Paul W. Frields" Date: Wed, 19 Jan 2011 01:32:56 +0000 Subject: Use HTML::Entities git-svn-id: https://irssi-libnotify.googlecode.com/svn/trunk@34 291cbfae-0d27-0410-99d7-557b17e6fe3d --- notify.pl | 6 ++---- 1 file 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//>/g; - $text =~ s/'/'/g; + encode_entities($text); return $text; } -- cgit