[issue12883] xml.sax.xmlreader.AttributesImpl allows empty string as attribute names

2021-04-30 Thread Irit Katriel


Irit Katriel  added the comment:

I don't think the proposed patch is an acceptable solution. It silently skips 
invalid attributes.  

It would be ok to either raise an exception or to leave it as it is 
(junk-in-junk-out).  I'm not sure which is better.

--
nosy: +iritkatriel
versions: +Python 3.11 -Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12883] xml.sax.xmlreader.AttributesImpl allows empty string as attribute names

2013-01-30 Thread Chenguang Wang

Chenguang Wang added the comment:

I found this problem is still not fixed in the lastest hg version. Seriously?

This patch is for the latest v3.4.0a0.

--
keywords: +patch
nosy: +Chenguang.Wang
Added file: http://bugs.python.org/file28915/w.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12883] xml.sax.xmlreader.AttributesImpl allows empty string as attribute names

2013-01-29 Thread Ramchandra Apte

Ramchandra Apte added the comment:

bump...

--
nosy: +ramchandra.apte

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12883] xml.sax.xmlreader.AttributesImpl allows empty string as attribute names

2011-09-02 Thread Michael Sulyaev

New submission from Michael Sulyaev :

I can get not-well-formed XML output (attribute name must not be empty string):




AttributeImpl must ignore dict entries that may not be cast to valid XML 
attributes.

Code:

#!/usr/bin/python

from xml.sax.xmlreader import AttributesImpl as Attrs
from xml.sax.saxutils import XMLGenerator as Gen

g = Gen()
a = Attrs(dict([('k1','v1'),('','v_for_empty_name')]))
g.startDocument()
g.startElement('root',a)
g.endElement('root')
g.endDocument()
print

--
components: XML
messages: 143391
nosy: Michael.Sulyaev
priority: normal
severity: normal
status: open
title: xml.sax.xmlreader.AttributesImpl allows empty string as attribute names
type: behavior
versions: Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com