[XML-SIG] xbel_parse bug

Dieter Maurer dieter@handshake.de
Sat, 11 Sep 1999 09:37:08 +0200 (CEST)

Hello Uche

 > xbel_parse.py does not properly convert "&"s in URLs to the & character 
 > entity.  I haven't checked its handling of < or " yet.
It is a bug in "html_builder.HtmlBuilder" combined with a
bug in "XmlWriter".

"html_builder.HtmlBuilder" contains:
	# Names of entities that will be converted to their character
	# representation.  Entities not listed here will be left as 
	# entity references.
	self.expand_entities = ('lt', 'gt', 'apos', 'quot')
These entities are converted to character codes,
all other entities remain entity references.

The "XmlWriter" in the 0.5.1 distribution seems not to handle entity
references (they are lost). Newer "XmlWriter" versions seem
to have improved somewhat. I did not check it for myself, though.

I (and someone else, too) reported this bug some months before. Look
into the archive to see some discussion for work arounds.

- Dieter