From: Georg Brandl Date: Thu, 25 Aug 2005 22:02:49 +0000 (+0000) Subject: backport bug [ 1262320 ] minidom.py alternate newl support is broken X-Git-Tag: v2.4.2c1~70 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=900a84a5a6cc1f415698e227d5de427ce001e31e;p=thirdparty%2FPython%2Fcpython.git backport bug [ 1262320 ] minidom.py alternate newl support is broken --- diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py index f17578baac99..4bb4ef49ff1d 100644 --- a/Lib/xml/dom/minidom.py +++ b/Lib/xml/dom/minidom.py @@ -1278,15 +1278,15 @@ class DocumentType(Identified, Childless, Node): writer.write("\n") + writer.write(">"+newl) class Entity(Identified, Node): attributes = None @@ -1739,9 +1739,9 @@ class Document(Node, DocumentLS): def writexml(self, writer, indent="", addindent="", newl="", encoding = None): if encoding is None: - writer.write('\n') + writer.write(''+newl) else: - writer.write('\n' % encoding) + writer.write('%s' % (encoding, newl)) for node in self.childNodes: node.writexml(writer, indent, addindent, newl)