cvs: pear /XML_Util Util.php /XML_Util/tests testBug_4950.phpt
[email protected] ("Chuck Burgess") Mon, 05 May 2008 16:37:22 -0000
| Newsgroups | php.pear.cvs |
|---|---|
| Message-ID | <cvsashnazg1210005442@cvsserver> |
ashnazg Mon May 5 16:37:22 2008 UTC
Modified files:
/pear/XML_Util Util.php
/pear/XML_Util/tests testBug_4950.phpt
Log:
PEAR #4950: Incorrect CDATA serializing
http://cvs.php.net/viewvc.cgi/pear/XML_Util/Util.php?r1=1.33&r2=1.34&diff_format=u
Index: pear/XML_Util/Util.php
diff -u pear/XML_Util/Util.php:1.33 pear/XML_Util/Util.php:1.34
--- pear/XML_Util/Util.php:1.33 Mon May 5 01:01:24 2008
+++ pear/XML_Util/Util.php Mon May 5 16:37:22 2008
@@ -43,7 +43,7 @@
* @author Stephan Schmidt <[email protected]>
* @copyright 2003-2008 Stephan Schmidt <[email protected]>
* @license http://opensource.org/licenses/bsd-license New BSD License
- * @version CVS: $Id: Util.php,v 1.33 2008/05/05 01:01:24 ashnazg Exp $
+ * @version CVS: $Id: Util.php,v 1.34 2008/05/05 16:37:22 ashnazg Exp $
* @link http://pear.php.net/package/XML_Util
*/
@@ -765,7 +765,8 @@
function createCDataSection($data)
{
return sprintf("<![CDATA[%s]]>",
- preg_replace('/\]\]>/', "]]>]]><![CDATA[", strval($data)));
+ preg_replace('/\]\]>/', "]]]]><![CDATA[>", strval($data)));
+
}
/**
http://cvs.php.net/viewvc.cgi/pear/XML_Util/tests/testBug_4950.phpt?r1=1.3&r2=1.4&diff_format=u
Index: pear/XML_Util/tests/testBug_4950.phpt
diff -u pear/XML_Util/tests/testBug_4950.phpt:1.3 pear/XML_Util/tests/testBug_4950.phpt:1.4
--- pear/XML_Util/tests/testBug_4950.phpt:1.3 Mon May 5 14:27:43 2008
+++ pear/XML_Util/tests/testBug_4950.phpt Mon May 5 16:37:22 2008
@@ -14,4 +14,4 @@
?>
--EXPECT--
TEST: test case provided in bug report
-<test><![CDATA[Content ]]>]]><![CDATA[</test> here!]]></test>
+<test><![CDATA[Content ]]]]><![CDATA[></test> here!]]></test>