1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-08-10 09:03:02 +03:00

fixed problem with entity handling within xsltCopyAttrListNoOverwrite

* libxslt/transform.c: fixed problem with entity handling
  within xsltCopyAttrListNoOverwrite (#352907)
* tests/general/bug-164.xsl, tests/general/bug-164.out,
  tests/docs/bug-164.oxml: added a regression test for this
This commit is contained in:
William M. Brack
2006-11-17 01:54:15 +00:00
parent 951beb01d4
commit 40cf80bcbc
7 changed files with 35 additions and 1 deletions

View File

@@ -1,3 +1,10 @@
Fri Nov 17 09:53:08 HKT 2006 William Brack <wbrack@mmm.com.hk>
* libxslt/transform.c: fixed problem with entity handling
within xsltCopyAttrListNoOverwrite (#352907)
* tests/general/bug-164.xsl, tests/general/bug-164.out,
tests/docs/bug-164.oxml: added a regression test for this
Thu Oct 26 15:31:01 CEST 2006 Daniel Veillard <daniel@veillard.com>
* NEWS configure.in doc//*: preparing release of libxslt-1.1.18,

View File

@@ -1074,8 +1074,12 @@ xsltCopyAttrListNoOverwrite(xsltTransformContextPtr ctxt,
} else
copyNs = NULL;
}
/*
* If attribute has a value, we need to copy it (watching out
* for possible entities)
*/
if (attr->children)
value = xmlNodeListGetString(attr->doc, attr->children, 1);
value = xmlNodeListGetString(attr->doc, attr->children, 0);
/*
* REVISIT: I think xmlNewDocProp() is the only attr function
* which does not eval if the attr is of type ID. This is good,

View File

@@ -162,6 +162,7 @@ EXTRA_DIST = \
bug-160.xml \
bug-161.xml \
bug-163.xml \
bug-164.xml \
character.xml \
array.xml \
items.xml

4
tests/docs/bug-164.xml Normal file
View File

@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<doc>
<stuff name="A &amp; B"/>
</doc>

View File

@@ -171,6 +171,7 @@ EXTRA_DIST = \
bug-160.out bug-160.xsl \
bug-161.out bug-161.xsl \
bug-163.out bug-163.xsl \
bug-164.out bug-164.xsl \
character.out character.xsl \
character2.out character2.xsl \
itemschoose.out itemschoose.xsl \

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="us-ascii"?>
<stuff name="A &amp; B"/>

13
tests/general/bug-164.xsl Normal file
View File

@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<xsl:stylesheet
version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:output encoding="us-ascii"/>
<xsl:template match="stuff">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>