/usr/lib/perl5/KinoSearch1/Highlight/SimpleHTMLEncoder.pm is in libkinosearch1-perl 1.00-1build3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | package KinoSearch1::Highlight::SimpleHTMLEncoder;
use strict;
use warnings;
use KinoSearch1::Util::ToolSet;
use base qw( KinoSearch1::Util::Class );
BEGIN {
__PACKAGE__->init_instance_vars();
}
sub encode {
my $text = $_[1];
for ($text) {
s/&/&/g;
s/"/"/g;
s/</</g;
s/>/>/g;
}
return $text;
}
1;
__END__
=head1 NAME
KinoSearch1::Highlight::SimpleHTMLEncoder - encode a few HTML entities
=head1 SYNOPSIS
# returns '"Hey, you!"'
my $encoded = $encoder->encode('"Hey, you!"');
=head1 DESCRIPTION
Implemetation of L<KinoSearch1::Highlight::Encoder> which encodes HTML
entities. Currently, this module takes a minimal approach, encoding only
'<', '>', '&', and '"'. That is likely to change in the future.
=head1 COPYRIGHT
Copyright 2006-2010 Marvin Humphrey
=head1 LICENSE, DISCLAIMER, BUGS, etc.
See L<KinoSearch1> version 1.00.
=cut
|