Both works the same way. And produce ```&amp;``` in output. But I'm puzzled. When I try this code:
```
from genshi.template import MarkupTemplate
tmpl = MarkupTemplate('<dd><a href="http://keys.fedoraproject.org/pks/lookup?search=0x${gpg_keyid}&amp;fingerprint=on&amp;hash=on&amp;op=index">${gpg_keyid}</a>&nbsp;</dd>')
stream = tmpl.generate(gpg_keyid='FFFFF')
print(stream.render('xhtml'))
```
It produce:
```
...search=0xFFFFF&amp;fingerprint=on&amp;...
```
Is this what we want? I would expect pure ```&``` at the output. But you are right that simple ```&``` in code leads to traceback.