convert > and < to &gt; and &lt; for owncast

This commit is contained in:
jake 2024-08-31 22:07:42 -04:00
parent c1a303e19f
commit 3356d6d181

View file

@ -19,7 +19,7 @@ use Mojo::JSON qw(decode_json);
use Mojo::UserAgent; use Mojo::UserAgent;
use Mojo::IRC; use Mojo::IRC;
use Carp qw(croak); use Carp qw(croak);
use Smart::Comments; #use Smart::Comments;
use MIME::Base64 qw(encode_base64); use MIME::Base64 qw(encode_base64);
## no critic (prototype) ## no critic (prototype)
@ -117,6 +117,9 @@ $irc->on(irc_privmsg => sub ($self, $message) {
$message->{params}[1] =~ s|\x03\d?\d||g; # colors $message->{params}[1] =~ s|\x03\d?\d||g; # colors
$message->{params}[1] =~ s|\x03||g; # bare color code ???? $message->{params}[1] =~ s|\x03||g; # bare color code ????
$message->{params}[1] =~ s|>|&gt;|g;
$message->{params}[1] =~ s|<|&lt;|g;
send_chat_to_owncast($message->{params}[1], $name[0]); send_chat_to_owncast($message->{params}[1], $name[0]);
} }
}); });