Fixes for Bug 2600, HTML tags in titles not escaped in many places
[koha.git] / misc / sax_parser_test.pl
blob07d672cf09a4b7cb471772799c62281fb4cd4801
1 #!/usr/bin/perl
2 use XML::SAX;
3 my $parser = XML::SAX::ParserFactory->parser(
4 Handler => MySAXHandler->new
5 );
6 binmode STDOUT, ":utf8";
7 print "\x{65}\x{301}\n";
8 use Encode; $parser->parse_string(encode_utf8("<xml>\x{65}\x{301}</xml>"));
9 $parser->parse_string("<xml>\xEF\xBB\xBF\x{65}\x{301}</xml>");
11 package MySAXHandler;
13 use base qw(XML::SAX::Base);
14 sub start_document {
15 my ($self, $doc) = @_;
16 # process document start event
19 sub start_element {
20 my ($self, $el) = @_;
21 # process element start event