[issue20714] Allow for ]] in CDATA in minidom

2014-02-24 Thread Peter Otten
Peter Otten added the comment: Perhaps a look at the competition is still in order: Java silently breaks such an invalid CDATA in two, as suggested. http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.htm says No lexical check is done on the content of a CDATA section and it is

[issue20714] Allow for ]] in CDATA in minidom

2014-02-23 Thread Artur R. Czechowski
Artur R. Czechowski added the comment: Proper patch with tests available in remote hg repo attached to this comment. -- hgrepos: +217 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20714 ___

[issue20714] Allow for ]] in CDATA in minidom

2014-02-23 Thread Artur R. Czechowski
Changes by Artur R. Czechowski artu...@hell.pl: Removed file: http://bugs.python.org/file34167/minidom.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20714 ___

[issue20714] Allow for ]] in CDATA in minidom

2014-02-23 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: Added file: http://bugs.python.org/file34167/minidom.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20714 ___

[issue20714] Allow for ]] in CDATA in minidom

2014-02-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: Artur: Please provide the follwing information (in this bug report, or in any other bug report you create in the future) 1. this is what I did 2. this is what happened 3. this is what should have happened instead In this case, a Python script that ought to

[issue20714] Allow for ]] in CDATA in minidom

2014-02-23 Thread Peter Otten
Changes by Peter Otten __pete...@web.de: -- nosy: +peter.otten ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20714 ___ ___ Python-bugs-list

[issue20714] Allow for ]] in CDATA in minidom

2014-02-23 Thread Artur R. Czechowski
Artur R. Czechowski added the comment: Martin, the exact information you need are: 1. this is what I did: #!/usr/bin/env python import unittest import xmlrunner class Foo(unittest.TestCase): def testFoo(self): self.assertTrue(False, ']]')

[issue20714] Allow for ]] in CDATA in minidom

2014-02-23 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: Removed file: http://bugs.python.org/file34167/minidom.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20714 ___

[issue20714] Allow for ]] in CDATA in minidom

2014-02-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: I fail to see the bug in Python. minidom is behaving correctly. The error is in xmlrunner, which does error_info = str(test_result.get_error_info()) failureText = xml_document.createCDATASection(error_info) This is incorrect - it would have to check that

[issue20714] Allow for ]] in CDATA in minidom

2014-02-23 Thread Artur R. Czechowski
Artur R. Czechowski added the comment: Martin, I partially agree with you. After rethinking the issue I agree that changing the behavior of createCDATASection maybe is not a good idea. On the other hand anyone in need of adding ]] into CDATA must write a few lines of code, which will be

[issue20714] Allow for ]] in CDATA in minidom

2014-02-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: I don't think your proposal can be implemented. createXYZ, in DOM, only creates a single node, which is not yet attached at all into a tree. So if you would want a convenience function to create multiple CDATA section, the application would then still have

[issue20714] Allow for ]] in CDATA in minidom

2014-02-21 Thread Éric Araujo
Éric Araujo added the comment: Does the XML spec allow that? -- nosy: +eric.araujo title: Please allow for ]] in CDATA in minidom.py - Allow for ]] in CDATA in minidom versions: +Python 3.5 -Python 2.7, Python 3.3 ___ Python tracker

[issue20714] Allow for ]] in CDATA in minidom

2014-02-21 Thread Artur R. Czechowski
Artur R. Czechowski added the comment: Eric, I'm not sure what exactly your concern is, but I'll try to address two issues I can see. First: both strings ![CDATA[ and ![CDATA[]] are a correct and valid examples of CDATA usage as per specification[1]. Second: is it allowed to have two

[issue20714] Allow for ]] in CDATA in minidom

2014-02-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20714 ___