summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorGerard Goossen <gerard@tty.nl>2008-03-27 14:55:31 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-03-27 14:42:41 +0000
commit643e696a61334e453a6ab25a83a9625db27387ac (patch)
tree56bf7733b166fa5486e6ae723a92d4e113e94af1 /dump.c
parent083e9212117053c68df042b3498d248a18973347 (diff)
downloadperl-643e696a61334e453a6ab25a83a9625db27387ac.tar.gz
MAD dump xml escape regex
Message-ID: <20080327125531.GN4409@ostwald> p4raw-id: //depot/perl@33584
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dump.c b/dump.c
index 7ad09b1e0c..37337bbabe 100644
--- a/dump.c
+++ b/dump.c
@@ -2534,8 +2534,8 @@ Perl_do_pmop_xmldump(pTHX_ I32 level, PerlIO *file, const PMOP *pm)
level++;
if (PM_GETRE(pm)) {
REGEXP *const r = PM_GETRE(pm);
- SV * const tmpsv = newSVsv((SV*)r);
- sv_utf8_upgrade(tmpsv);
+ SV * const tmpsv = newSVpvn_utf8("", 0, TRUE);
+ sv_catxmlsv(tmpsv, (SV*)r);
Perl_xmldump_indent(aTHX_ level, file, "pre=\"%s\"\n",
SvPVX(tmpsv));
SvREFCNT_dec(tmpsv);