Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions roboticstoolbox/tools/xacro/xmlutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
# Maintainer: Morgan Quigley <morgan@osrfoundation.org>

import xml.dom.minidom
from xml.sax.saxutils import quoteattr


def first_child_element(elt):
Expand Down Expand Up @@ -120,9 +121,7 @@ def fixed_writexml(self, writer, indent="", addindent="", newl=""): # pragma:
a_names = sorted(attrs.keys())

for a_name in a_names:
writer.write(" %s=\"" % a_name)
xml.dom.minidom._write_data(writer, attrs[a_name].value)
writer.write("\"")
writer.write(" %s=%s" % (a_name, quoteattr(attrs[a_name].value)))
if self.childNodes:
if len(self.childNodes) == 1 \
and self.childNodes[0].nodeType == xml.dom.minidom.Node.TEXT_NODE:
Expand Down