HTMLBuilder and <A HREF='script.py?foo=bar&ding=bats'>yeah teah</A>
Ben Skelton
b.skelton at usa.net
Thu Mar 9 09:14:08 EST 2000
Hello
I am using python1.5.1 and xml0.5.2.
I build a html page like this:
from xml.dom.html_builder import HtmlBuilder
from xml.dom.writer import HtmlLineariser
b = HtmlBuilder ()
b.startElement ('html')
b.startElement ('a', {'href': 'script.py?foo=bar&ding=bats'})
b.text ('Press me')
b.endElement ('a')
b.endElement ('html')
but this gives:
>>print HtmlLineariser().linearise(b.document)
<HTML><A HREF="script.py?foo=bar&ding=bats">Press me</A></HTML>
note the '&' in the href argument.
How can I do this properly?
thanks in advance
--Ben
More information about the Python-list
mailing list