diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2003-11-01 06:45:21 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2003-11-01 06:45:21 +0000 |
commit | fa4f217009816b0f0cff9b1b9729a7dcd5939fc5 (patch) | |
tree | 80295ce48a90dbbcc594b61f4414cc4f3f96fdcb /tests/exslt/strings | |
parent | 87c1e30beef493a380a7d4a880598729604bff9b (diff) | |
download | libxslt-fa4f217009816b0f0cff9b1b9729a7dcd5939fc5.tar.gz libxslt-fa4f217009816b0f0cff9b1b9729a7dcd5939fc5.tar.bz2 libxslt-fa4f217009816b0f0cff9b1b9729a7dcd5939fc5.zip |
fix bug #125265 about entities breaking exsl:tokenize and exsl:split
* libexslt/strings.c: fix bug #125265 about entities breaking
exsl:tokenize and exsl:split
* tests/exslt/strings/split.1.* tests/exslt/strings/tokenize.1.*:
augmented the reression tests with the example from the bug report.
Daniel
Diffstat (limited to 'tests/exslt/strings')
-rw-r--r-- | tests/exslt/strings/split.1.out | 5 | ||||
-rw-r--r-- | tests/exslt/strings/split.1.xsl | 5 | ||||
-rw-r--r-- | tests/exslt/strings/tokenize.1.out | 9 | ||||
-rw-r--r-- | tests/exslt/strings/tokenize.1.xsl | 11 |
4 files changed, 27 insertions, 3 deletions
diff --git a/tests/exslt/strings/split.1.out b/tests/exslt/strings/split.1.out index 9166a2cf..1fbb470b 100644 --- a/tests/exslt/strings/split.1.out +++ b/tests/exslt/strings/split.1.out @@ -10,4 +10,7 @@ <token>f</token><token>o</token><token>o</token><token>b</token><token>a</token><token>r</token> str:split('-*- hello - world -*-', '-') - <token>*</token><token> hello </token><token> world </token><token>*</token></out> + <token>*</token><token> hello </token><token> world </token><token>*</token> + + str:split('data &math str;') + <token>data</token><token>&math</token><token>str;</token></out> diff --git a/tests/exslt/strings/split.1.xsl b/tests/exslt/strings/split.1.xsl index 42d88d58..7958bd1b 100644 --- a/tests/exslt/strings/split.1.xsl +++ b/tests/exslt/strings/split.1.xsl @@ -17,7 +17,10 @@ str:split('-*- hello - world -*-', '-') <xsl:copy-of select="str:split('-*- hello - world -*-', '-')"/> + + str:split('data &math str;') + <xsl:copy-of select="str:split('data &math str;')"/> </out> </xsl:template> -</xsl:stylesheet>
\ No newline at end of file +</xsl:stylesheet> diff --git a/tests/exslt/strings/tokenize.1.out b/tests/exslt/strings/tokenize.1.out index a521f4bd..debb2516 100644 --- a/tests/exslt/strings/tokenize.1.out +++ b/tests/exslt/strings/tokenize.1.out @@ -5,4 +5,13 @@ str:tokenize('date math str') <token>date</token><token>math</token><token>str</token>; + + str:tokenize('This is & strange behavior', ' ') + <token>This</token><token>is</token><token>&</token><token>strange</token><token>behavior</token>; + + str:tokenize('This is & strange; behavior', ' ') + <token>This</token><token>is</token><token>&</token><token>strange;</token><token>behavior</token>; + + str:tokenize('This is &strange; behavior', ' ') + <token>This</token><token>is</token><token>&strange;</token><token>behavior</token>; </out> diff --git a/tests/exslt/strings/tokenize.1.xsl b/tests/exslt/strings/tokenize.1.xsl index 81de97fe..0e801d02 100644 --- a/tests/exslt/strings/tokenize.1.xsl +++ b/tests/exslt/strings/tokenize.1.xsl @@ -11,7 +11,16 @@ str:tokenize('date math str') <xsl:copy-of select="str:tokenize('date math str')"/>; + + str:tokenize('This is & strange behavior', ' ') + <xsl:copy-of select="str:tokenize('This is & strange behavior', ' ')"/>; + + str:tokenize('This is & strange; behavior', ' ') + <xsl:copy-of select="str:tokenize('This is & strange; behavior', ' ')"/>; + + str:tokenize('This is &strange; behavior', ' ') + <xsl:copy-of select="str:tokenize('This is &strange; behavior', ' ')"/>; </out> </xsl:template> -</xsl:stylesheet>
\ No newline at end of file +</xsl:stylesheet> |