in reply to Re: Regex Substitution in sub
in thread Regex Substitution in sub
I read today in everyone's favourite module:
This is the heavy strictless module that everyone still recommends. /o? /s? WHY?!$toencode =~ s{&}{&}gso; $toencode =~ s{<}{<}gso; $toencode =~ s{>}{>}gso; $toencode =~ s{"}{"}gso; my $latin = uc $self->{'.charset'} eq 'ISO-8859-1' || uc $self->{'.charset'} eq 'WINDOWS-1252'; if ($latin) { # bug in some browsers $toencode =~ s{'}{'}gso; $toencode =~ s{\x8b}{‹}gso; $toencode =~ s{\x9b}{›}gso; if (defined $newlinestoo && $newlinestoo) { $toencode =~ s{\012}{ }gso; $toencode =~ s{\015}{ }gso; } } return $toencode;
Can we please stop using and recommending CGI.pm now? Please?
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regex Substitution in sub (getting away from CGI.pm)
by Aristotle (Chancellor) on Jun 04, 2003 at 23:46 UTC | |
by Juerd (Abbot) on Jun 05, 2003 at 07:06 UTC |