Commit 279ca75a authored by Fred Drake's avatar Fred Drake

Be a little smarter on some attribute values, making an assumption about

the DTD.
parent 3a7ff998
......@@ -32,7 +32,10 @@ def format_attrs(attrs, xml=0):
if name == value and isnmtoken(value):
s = "%s %s" % (s, value)
elif istoken(value):
s = "%s %s=%s" % (s, name, value)
if value == "no" + name:
s = "%s %s" % (s, value)
else:
s = "%s %s=%s" % (s, name, value)
else:
s = '%s %s="%s"' % (s, name, escape(value))
return s
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment