Hello community,

here is the log from the commit of package perl-XML-SAX-Writer for 
openSUSE:Factory checked in at 2017-08-06 11:29:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-XML-SAX-Writer (Old)
 and      /work/SRC/openSUSE:Factory/.perl-XML-SAX-Writer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-XML-SAX-Writer"

Sun Aug  6 11:29:58 2017 rev:8 rq:512883 version:0.57

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-XML-SAX-Writer/perl-XML-SAX-Writer.changes  
2015-04-22 01:15:15.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-XML-SAX-Writer.new/perl-XML-SAX-Writer.changes 
    2017-08-06 11:29:59.400078800 +0200
@@ -1,0 +2,6 @@
+Tue Jul 25 06:33:00 UTC 2017 - co...@suse.com
+
+- updated to 0.57
+   see /usr/share/doc/packages/perl-XML-SAX-Writer/Changes
+
+-------------------------------------------------------------------

Old:
----
  XML-SAX-Writer-0.56.tar.gz

New:
----
  XML-SAX-Writer-0.57.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-XML-SAX-Writer.spec ++++++
--- /var/tmp/diff_new_pack.F5H4JT/_old  2017-08-06 11:30:00.579912581 +0200
+++ /var/tmp/diff_new_pack.F5H4JT/_new  2017-08-06 11:30:00.595910327 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-XML-SAX-Writer
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,14 @@
 
 
 Name:           perl-XML-SAX-Writer
-Version:        0.56
+Version:        0.57
 Release:        0
 %define cpan_name XML-SAX-Writer
 Summary:        SAX2 XML Writer
 License:        Artistic-1.0 or GPL-1.0+
 Group:          Development/Libraries/Perl
 Url:            http://search.cpan.org/dist/XML-SAX-Writer/
-Source0:        
http://www.cpan.org/authors/id/P/PE/PERIGRIN/%{cpan_name}-%{version}.tar.gz
+Source0:        
https://cpan.metacpan.org/authors/id/P/PE/PERIGRIN/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -43,7 +43,7 @@
 
 %prep
 %setup -q -n %{cpan_name}-%{version}
-find . -type f -print0 | xargs -0 chmod 644
+find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
 
 %build
 %{__perl} Makefile.PL INSTALLDIRS=vendor
@@ -59,6 +59,7 @@
 
 %files -f %{name}.files
 %defattr(-,root,root,755)
-%doc Changes LICENSE README README.md
+%doc Changes README README.md
+%license LICENSE
 
 %changelog

++++++ XML-SAX-Writer-0.56.tar.gz -> XML-SAX-Writer-0.57.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-SAX-Writer-0.56/MANIFEST 
new/XML-SAX-Writer-0.57/MANIFEST
--- old/XML-SAX-Writer-0.56/MANIFEST    2014-11-13 19:51:22.000000000 +0100
+++ new/XML-SAX-Writer-0.57/MANIFEST    2017-07-17 21:01:28.000000000 +0200
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest 
v5.025.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest 
v6.010.
 Changes
 LICENSE
 MANIFEST
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-SAX-Writer-0.56/META.yml 
new/XML-SAX-Writer-0.57/META.yml
--- old/XML-SAX-Writer-0.56/META.yml    2014-11-13 19:51:22.000000000 +0100
+++ new/XML-SAX-Writer-0.57/META.yml    2017-07-17 21:01:28.000000000 +0200
@@ -11,7 +11,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 5.025, CPAN::Meta::Converter version 
2.142690'
+generated_by: 'Dist::Zilla version 6.010, CPAN::Meta::Converter version 
2.150005'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -22,7 +22,9 @@
   XML::Filter::BufferText: '1.00'
   XML::NamespaceSupport: '1.00'
   XML::SAX::Exception: '1.01'
+  perl: v5.5.0
 resources:
   homepage: https://github.com/perigrin/xml-sax-writer
   repository: https://github.com/perigrin/xml-sax-writer.git
-version: '0.56'
+version: '0.57'
+x_serialization_backend: 'YAML::Tiny version 1.70'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-SAX-Writer-0.56/Makefile.PL 
new/XML-SAX-Writer-0.57/Makefile.PL
--- old/XML-SAX-Writer-0.56/Makefile.PL 2014-11-13 19:51:22.000000000 +0100
+++ new/XML-SAX-Writer-0.57/Makefile.PL 2017-07-17 21:01:28.000000000 +0200
@@ -1,14 +1,11 @@
-
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker 
v5.025.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker 
v6.010.
 use strict;
 use warnings;
 
-
+use 5.005000;
 
 use ExtUtils::MakeMaker;
 
-
-
 my %WriteMakefileArgs = (
   "ABSTRACT" => "SAX2 XML Writer",
   "AUTHOR" => "Robin Berjon <robin\@knowscape.com>, Chris Prather 
<chris\@prather.org>",
@@ -19,8 +16,8 @@
     "ExtUtils::MakeMaker" => 0
   },
   "DISTNAME" => "XML-SAX-Writer",
-  "EXE_FILES" => [],
   "LICENSE" => "perl",
+  "MIN_PERL_VERSION" => "5.005000",
   "NAME" => "XML::SAX::Writer",
   "PREREQ_PM" => {
     "Encode" => "2.12",
@@ -34,7 +31,7 @@
     "IPC::Open3" => 0,
     "Test::More" => "0.40"
   },
-  "VERSION" => "0.56",
+  "VERSION" => "0.57",
   "test" => {
     "TESTS" => "t/*.t"
   }
@@ -43,7 +40,6 @@
 
 my %FallbackPrereqs = (
   "Encode" => "2.12",
-  "ExtUtils::MakeMaker" => 0,
   "File::Spec" => 0,
   "IO::Handle" => 0,
   "IPC::Open3" => 0,
@@ -64,6 +60,3 @@
   unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
 
 WriteMakefile(%WriteMakefileArgs);
-
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-SAX-Writer-0.56/README 
new/XML-SAX-Writer-0.57/README
--- old/XML-SAX-Writer-0.56/README      2014-11-13 19:51:22.000000000 +0100
+++ new/XML-SAX-Writer-0.57/README      2017-07-17 21:01:28.000000000 +0200
@@ -1,7 +1,7 @@
 
 
 This archive contains the distribution XML-SAX-Writer,
-version 0.56:
+version 0.57:
 
   SAX2 XML Writer
 
@@ -11,5 +11,5 @@
 the same terms as the Perl 5 programming language system itself.
 
 
-This README file was generated by Dist::Zilla::Plugin::Readme v5.025.
+This README file was generated by Dist::Zilla::Plugin::Readme v6.010.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-SAX-Writer-0.56/README.md 
new/XML-SAX-Writer-0.57/README.md
--- old/XML-SAX-Writer-0.56/README.md   2014-11-13 19:51:22.000000000 +0100
+++ new/XML-SAX-Writer-0.57/README.md   2017-07-17 21:01:28.000000000 +0200
@@ -9,13 +9,13 @@
 Since version 0.50, it is maintained by means of the Perl XML 
 project [perl-xml.sourceforge.net]:
 
- - The sources are stored in the SourceForge Subversion repository:
-   repository: https://svn.sourceforge.net/svnroot/perl-xml
+ - The sources are stored in the Github repository at
+   https://github.com/perigrin/xml-sax-writer
 
  - Requests and comments should be sent to the 
    perl-...@listserv.activestate.com mailing list
 
- - Bugs should be reported to RT.cpan.org
+ - Bugs should be reported to RT.cpan.org or the Github issue tracker.
 
 Robin considered this module alpha but after years of testing on
 humans we believe it can be considered beta now.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-SAX-Writer-0.56/dist.ini 
new/XML-SAX-Writer-0.57/dist.ini
--- old/XML-SAX-Writer-0.56/dist.ini    2014-11-13 19:51:22.000000000 +0100
+++ new/XML-SAX-Writer-0.57/dist.ini    2017-07-17 21:01:28.000000000 +0200
@@ -8,6 +8,8 @@
 [@Basic]
 [PkgVersion]
 [Prereqs::FromCPANfile]
+[Prereqs]
+perl = 5.5.0
 
 [PruneFiles]
 match = ^nytprof.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-SAX-Writer-0.56/lib/XML/SAX/Writer/XML.pm 
new/XML-SAX-Writer-0.57/lib/XML/SAX/Writer/XML.pm
--- old/XML-SAX-Writer-0.56/lib/XML/SAX/Writer/XML.pm   2014-11-13 
19:51:22.000000000 +0100
+++ new/XML-SAX-Writer-0.57/lib/XML/SAX/Writer/XML.pm   2017-07-17 
21:01:28.000000000 +0200
@@ -1,6 +1,7 @@
 package XML::SAX::Writer::XML;
-$XML::SAX::Writer::XML::VERSION = '0.56';
+$XML::SAX::Writer::XML::VERSION = '0.57';
 use strict;
+use warnings;
 use XML::NamespaceSupport   qw();
 @XML::SAX::Writer::XML::ISA = qw(XML::SAX::Writer);
 
@@ -19,6 +20,7 @@
 
     $self->setConverter;
     $self->setEscaperRegex;
+    $self->setAttributeEscaperRegex;
     $self->setCommentEscaperRegex;
 
     $self->{NSDecl} = [];
@@ -98,7 +100,7 @@
     # build a string from what we have, and buffer it
     my $el = '<' . $data->{Name};
     for my $k (keys %attr_hash) {
-        $el .= ' ' . $k . qq[=$self->{QuoteCharacter}] . 
$self->escape($attr_hash{$k}) . qq[$self->{QuoteCharacter}];
+        $el .= ' ' . $k . qq[=$self->{QuoteCharacter}] . 
$self->escapeAttribute($attr_hash{$k}) . qq[$self->{QuoteCharacter}];
     }
 
     $self->{BufferElement} = $el;
@@ -479,14 +481,14 @@
     # also, there's order in the pseudo-attr
     my $xd = '';
     if ($data->{Version}) {
-        $xd .= "<?xml version='$data->{Version}'";
+        $xd .= "<?xml version=\"$data->{Version}\"";
         if ($data->{Encoding}) {
-            $xd .= " encoding='$data->{Encoding}'";
+            $xd .= " encoding=\"$data->{Encoding}\"";
         }
         if ($data->{Standalone}) {
-            $xd .= " standalone='$data->{Standalone}'";
+            $xd .= " standalone=\"$data->{Standalone}\"";
         }
-        $xd .= '?>';
+        $xd .= "?>\n";
     }
 
     #$xd = $self->{Encoder}->convert($xd); # this may blow up
@@ -546,7 +548,7 @@
 
 =head1 VERSION
 
-version 0.56
+version 0.57
 
 =head1 SYNOPSIS
 
@@ -556,20 +558,6 @@
 
 ...
 
-=head1 NAME
-
-XML::SAX::Writer::XML - SAX2 XML Writer
-
-=head1 AUTHOR
-
-Robin Berjon, ro...@knowscape.com
-
-=head1 COPYRIGHT
-
-Copyright (c) 2001-2006 Robin Berjon and Perl XML project. All rights 
reserved. 
-This program is free software; you can redistribute it and/or modify it under 
-the same terms as Perl itself.
-
 =head1 SEE ALSO
 
 XML::SAX::*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-SAX-Writer-0.56/lib/XML/SAX/Writer.pm 
new/XML-SAX-Writer-0.57/lib/XML/SAX/Writer.pm
--- old/XML-SAX-Writer-0.56/lib/XML/SAX/Writer.pm       2014-11-13 
19:51:22.000000000 +0100
+++ new/XML-SAX-Writer-0.57/lib/XML/SAX/Writer.pm       2017-07-17 
21:01:28.000000000 +0200
@@ -1,7 +1,8 @@
 package XML::SAX::Writer;
-$XML::SAX::Writer::VERSION = '0.56';
+$XML::SAX::Writer::VERSION = '0.57';
 use strict;
-use vars qw(%DEFAULT_ESCAPE %COMMENT_ESCAPE);
+use warnings;
+use vars qw(%DEFAULT_ESCAPE %ATTRIBUTE_ESCAPE %COMMENT_ESCAPE);
 
 # ABSTRACT: SAX2 XML Writer
 
@@ -20,6 +21,13 @@
                     "'"     => '&apos;',
                   );
 
+%ATTRIBUTE_ESCAPE = (
+                    %DEFAULT_ESCAPE,
+                    "\t"    => '&#x9;',
+                    "\n"    => '&#xA;',
+                    "\r"    => '&#xD;',
+                  );
+
 %COMMENT_ESCAPE = (
                     '--'    => '&#45;&#45;',
                   );
@@ -35,6 +43,7 @@
     # default the options
     $opt->{Writer}          ||= 'XML::SAX::Writer::XML';
     $opt->{Escape}          ||= \%DEFAULT_ESCAPE;
+    $opt->{AttributeEscape} ||= \%ATTRIBUTE_ESCAPE;
     $opt->{CommentEscape}   ||= \%COMMENT_ESCAPE;
     $opt->{EncodeFrom}        = exists $opt->{EncodeFrom} ? $opt->{EncodeFrom} 
: 'utf-8';
     $opt->{EncodeTo}          = exists $opt->{EncodeTo}   ? $opt->{EncodeTo}   
: 'utf-8';
@@ -126,6 +135,20 @@
 #-------------------------------------------------------------------#
 
 #-------------------------------------------------------------------#
+# setAttributeEscaperRegex
+#-------------------------------------------------------------------#
+sub setAttributeEscaperRegex {
+    my $self = shift;
+
+        $self->{AttributeEscaperRegex} = 
+            eval 'qr/'                                                         
.
+            join( '|', map { $_ = "\Q$_\E" } keys %{$self->{AttributeEscape}}) 
.
+            '/;'                                                               
;
+    return $self;
+}
+#-------------------------------------------------------------------#
+
+#-------------------------------------------------------------------#
 # setCommentEscaperRegex
 #-------------------------------------------------------------------#
 sub setCommentEscaperRegex {
@@ -152,6 +175,18 @@
 #-------------------------------------------------------------------#
 
 #-------------------------------------------------------------------#
+# escapeAttribute
+#-------------------------------------------------------------------#
+sub escapeAttribute {
+    my $self = shift;
+    my $str  = shift;
+
+    $str =~ 
s/($self->{AttributeEscaperRegex})/$self->{AttributeEscape}->{$1}/ge;
+    return $str;
+}
+#-------------------------------------------------------------------#
+
+#-------------------------------------------------------------------#
 # escapeComment
 #-------------------------------------------------------------------#
 sub escapeComment {
@@ -189,7 +224,7 @@
 # new methods are added to the interface
 
 package XML::SAX::Writer::ConsumerInterface;
-$XML::SAX::Writer::ConsumerInterface::VERSION = '0.56';
+$XML::SAX::Writer::ConsumerInterface::VERSION = '0.57';
 sub new {
     my $class = shift;
     my $ref = shift;
@@ -207,7 +242,7 @@
 #```````````````````````````````````````````````````````````````````#
 
 package XML::SAX::Writer::StringConsumer;
-$XML::SAX::Writer::StringConsumer::VERSION = '0.56';
+$XML::SAX::Writer::StringConsumer::VERSION = '0.57';
 @XML::SAX::Writer::StringConsumer::ISA = 
qw(XML::SAX::Writer::ConsumerInterface);
 
 #-------------------------------------------------------------------#
@@ -237,7 +272,7 @@
 #```````````````````````````````````````````````````````````````````#
 
 package XML::SAX::Writer::CodeConsumer;
-$XML::SAX::Writer::CodeConsumer::VERSION = '0.56';
+$XML::SAX::Writer::CodeConsumer::VERSION = '0.57';
 @XML::SAX::Writer::CodeConsumer::ISA = qw(XML::SAX::Writer::ConsumerInterface 
);
 
 #-------------------------------------------------------------------#
@@ -268,7 +303,7 @@
 #```````````````````````````````````````````````````````````````````#
 
 package XML::SAX::Writer::ArrayConsumer;
-$XML::SAX::Writer::ArrayConsumer::VERSION = '0.56';
+$XML::SAX::Writer::ArrayConsumer::VERSION = '0.57';
 @XML::SAX::Writer::ArrayConsumer::ISA = 
qw(XML::SAX::Writer::ConsumerInterface);
 
 #-------------------------------------------------------------------#
@@ -299,7 +334,7 @@
 #```````````````````````````````````````````````````````````````````#
 
 package XML::SAX::Writer::HandleConsumer;
-$XML::SAX::Writer::HandleConsumer::VERSION = '0.56';
+$XML::SAX::Writer::HandleConsumer::VERSION = '0.57';
 @XML::SAX::Writer::HandleConsumer::ISA = 
qw(XML::SAX::Writer::ConsumerInterface);
 
 #-------------------------------------------------------------------#
@@ -325,14 +360,17 @@
 #```````````````````````````````````````````````````````````````````#
 
 package XML::SAX::Writer::FileConsumer;
-$XML::SAX::Writer::FileConsumer::VERSION = '0.56';
+$XML::SAX::Writer::FileConsumer::VERSION = '0.57';
 @XML::SAX::Writer::FileConsumer::ISA = qw(XML::SAX::Writer::HandleConsumer);
 
 #-------------------------------------------------------------------#
 # new
 #-------------------------------------------------------------------#
 sub new {
-    my ( $proto, $file ) = ( shift, shift );
+    my ( $proto, $file, $opt ) = @_;
+    my $enc_to = (defined $opt and ref $opt eq 'HASH'
+                  and defined $opt->{EncodeTo}) ? $opt->{EncodeTo}
+                                                : 'utf-8';
 
     XML::SAX::Writer::Exception->throw(
         Message => "No filename provided to " . ref( $proto || $proto )
@@ -340,9 +378,10 @@
 
     local *XFH;
 
-    open XFH, ">$file" or XML::SAX::Writer::Exception->throw(
+    open XFH, ">:encoding($enc_to)", $file
+      or XML::SAX::Writer::Exception->throw(
         Message => "Error opening file $file: $!"
-    );
+      );
 
     return $proto->SUPER::new( *{XFH}{IO}, @_ );
 }
@@ -363,7 +402,7 @@
 #```````````````````````````````````````````````````````````````````#
 
 package XML::SAX::Writer::NullConverter;
-$XML::SAX::Writer::NullConverter::VERSION = '0.56';
+$XML::SAX::Writer::NullConverter::VERSION = '0.57';
 sub new     { return bless [], __PACKAGE__ }
 sub convert { $_[1] }
 
@@ -373,7 +412,7 @@
 #```````````````````````````````````````````````````````````````````#
 
 package XML::SAX::Writer::Encode;
-$XML::SAX::Writer::Encode::VERSION = '0.56';
+$XML::SAX::Writer::Encode::VERSION = '0.57';
 sub new {
     my ($class, $from, $to) = @_;
     my $self = {
@@ -408,7 +447,7 @@
 
 =head1 VERSION
 
-version 0.56
+version 0.57
 
 =head1 SYNOPSIS
 
@@ -466,6 +505,11 @@
 
 If this parameter is not provided, then output is sent to STDOUT.
 
+Note that there is no means to set an encoding layer on filehandles
+created by this module; if this is necessary, the calling code should
+first open a filehandle with the appropriate encoding set, and pass
+that filehandle to this module.
+
 =item * Escape
 
 This should be a hash reference where the keys are characters
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-SAX-Writer-0.56/t/00-compile.t 
new/XML-SAX-Writer-0.57/t/00-compile.t
--- old/XML-SAX-Writer-0.56/t/00-compile.t      2014-11-13 19:51:22.000000000 
+0100
+++ new/XML-SAX-Writer-0.57/t/00-compile.t      2017-07-17 21:01:28.000000000 
+0200
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.051
+# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.056
 
 use Test::More;
 
@@ -17,7 +17,9 @@
 
 # no fake home requested
 
-my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib';
+my @switches = (
+    -d 'blib' ? '-Mblib' : '-Ilib',
+);
 
 use File::Spec;
 use IPC::Open3;
@@ -31,12 +33,19 @@
     # see L<perlfaq8/How can I capture STDERR from an external command?>
     my $stderr = IO::Handle->new;
 
-    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', 
"require q[$lib]");
+    diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . 
$str . q{'} }
+            $^X, @switches, '-e', "require q[$lib]"))
+        if $ENV{PERL_COMPILE_TEST_DEBUG};
+
+    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', 
"require q[$lib]");
     binmode $stderr, ':crlf' if $^O eq 'MSWin32';
     my @_warnings = <$stderr>;
     waitpid($pid, 0);
     is($?, 0, "$lib loaded ok");
 
+    shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
+        and not eval { require blib; blib->VERSION('1.01') };
+
     if (@_warnings)
     {
         warn @_warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-SAX-Writer-0.56/t/20bugs.t 
new/XML-SAX-Writer-0.57/t/20bugs.t
--- old/XML-SAX-Writer-0.56/t/20bugs.t  2014-11-13 19:51:22.000000000 +0100
+++ new/XML-SAX-Writer-0.57/t/20bugs.t  2017-07-17 21:01:28.000000000 +0200
@@ -7,7 +7,7 @@
 
 use strict;
 
-use Test::More tests => 2;
+use Test::More tests => 3;
 use XML::SAX::Writer qw();
 
 my $isoL1 = ($^O eq 'VMS') ? 'iso8859-1' : 'iso-8859-1';
@@ -66,3 +66,33 @@
 $w->end_document;
 
 ok($out eq "<root>_LOST_DATA_</root>", 'Latin2 characters');
+
+##################################################
+# Whitespace not properly escaped in attribute values #11
+# https://github.com/perigrin/xml-sax-writer/issues/11
+
+$w = XML::SAX::Writer->new({Output => \$out})->{Handler};
+$w->start_document;
+$w->start_element({
+    Name       => 'root', 
+    Prefix => '', 
+    LocalName => 'root',
+    NamespaceURI => '',
+    Attributes => {
+        whitespace => {
+            Name       => 'whitespace', 
+            Prefix => '', 
+            LocalName => 'whitespace',
+            NamespaceURI => '',
+            Value => "tab=[\t],newline=[\n],carriage_return=[\r]"
+        }
+    }
+});
+$w->end_element({Name  => 'root', 
+                Prefix => '', 
+                LocalName => 'root',
+                NamespaceURI => ''});
+$w->end_document;
+is($out, 
+    "<root whitespace='tab=[&#x9;],newline=[&#xA;],carriage_return=[&#xD;]' 
/>", 
+    'attributes with whitespace');


Reply via email to