* Don't autovifivy @fields array entries.
[interchange.git] / code / Filter / encode_special_entities.filter
1 # Copyright 2010 Interchange Development Group
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.  See the LICENSE file for details.
7
8 CodeDef encode_special_entities Filter
9 CodeDef encode_special_entities Description Encode HTML special entities "&<>
10 CodeDef encode_special_entities Routine <<EOR
11 sub {
12         my $val = shift;
13
14         $val =~ s/"/&quot;/g;
15         $val =~ s/&/&amp;/g;
16         $val =~ s/</&lt;/g;
17         $val =~ s/>/&gt;/g;
18
19         return $val;
20 }
21 EOR