Subject: | Failure to escape doubled double-quotes |
% /opt/perl-5.14.1/bin/perl -MXML::Generator -wle
'$s=XML::Generator->new(qw/ escape unescaped conformance strict pretty 2
/); print $s->testme({ message => $_ }) for @ARGV' 'x"y' 'x""y'
<testme message="x"y" />
<testme message="x""y" />
%
I expected the output to be:
<testme message="x"y" />
<testme message="x""y" />
Tested with v0.99 on perl-5.8.8, and with v1.04 on perl-5.8.8 and
perl-5.14.1.
Hugo
% /opt/perl-5.14.1/bin/perl -V
Summary of my perl5 (revision 5 version 14 subversion 1) configuration:
Platform:
osname=linux, osvers=2.6.32-33-generic, archname=i686-linux
uname='linux hugovandersanden-desktop 2.6.32-33-generic #72-ubuntu
smp fri jul 29 21:08:37 utc 2011 i686 gnulinux '
config_args='-des -Dprefix=/opt/perl-5.14.1 -Uversiononly'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include'
ccversion='', gccversion='4.4.3', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib/../lib /usr/lib/../lib /lib /usr/lib
/usr/lib/i486-linux-gnu /usr/lib64
libs=-lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.11.1.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.11.1'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib
-fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
PERL_PRESERVE_IVUV USE_LARGE_FILES USE_PERLIO
USE_PERL_ATOF
Built under linux
Compiled at Sep 15 2011 14:09:12
@INC:
/opt/perl-5.14.1/lib/site_perl/5.14.1/i686-linux
/opt/perl-5.14.1/lib/site_perl/5.14.1
/opt/perl-5.14.1/lib/5.14.1/i686-linux
/opt/perl-5.14.1/lib/5.14.1
.
%