Tim Roberts wrote:
"bruce" <[EMAIL PROTECTED]> wrote:
it's the beautifulsoup() that's taking the "&E" and giving the "&E;"...

Right, as it should.  "A&E" is not valid HTML, and beautifulsoup expects
valid HTML.

This can be difficult to fix in the general case, because your page might
already contain "&amp;".  If it is possible that some of them might be
wrong while some are right, you can do something like:

    s = s.replace( '&amp;', '&' ).replace( '&', '&amp;' )

Yeah, but what about &auml; and friend then? As you said, its not really
easy to fix.

Regards
Tino

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to