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:
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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
4
tests/docs/bug-164.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<stuff name="A & B"/>
|
||||
</doc>
|
@@ -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 \
|
||||
|
4
tests/general/bug-164.out
Normal file
4
tests/general/bug-164.out
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?>
|
||||
|
||||
<stuff name="A & B"/>
|
||||
|
13
tests/general/bug-164.xsl
Normal file
13
tests/general/bug-164.xsl
Normal 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>
|
Reference in New Issue
Block a user