diff options
author | Paul W. Frields <stickster@gmail.com> | 2011-01-19 01:32:56 +0000 |
---|---|---|
committer | Paul W. Frields <stickster@gmail.com> | 2011-01-19 01:32:56 +0000 |
commit | 9ce241ef637f2a35adc77a12f1273dfa77a1b3c8 (patch) | |
tree | ff9a11b05a3bb1ccc3345f020ec19716efb4ea90 | |
parent | 18db1f2c01680a73d84c0f32d01dc1dc3cc72ec7 (diff) | |
download | irssi-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.pl | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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; - $text =~ s/'/'/g; + encode_entities($text); return $text; } |