Be a little smarter on some attribute values, making an assumption about
the DTD.
This commit is contained in:
parent
3a7ff998ac
commit
279ca75a5b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue