The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Newsgroups: comp.lang.python
From: Matimus <mccre...@gmail.com>
Date: Mon, 04 Jun 2007 17:17:27 -0000
Local: Tues, Jun 5 2007 3:17 am
Subject: Re: How do you htmlentities in Python
On Jun 4, 6:31 am, "js " <ebgs...@gmail.com> wrote:
> Hi list. I think this is the standard idiom: > If I'm not mistaken, in python, there's no standard library to convert > htmlentitydefs provides maps that helps this conversion, > To me this seemed odd because python is known as > So my questions are > Thank you in advance. >>> import xml.sax.saxutils as saxutils 'A bunch of text with entities: & > <' >>> saxutils.escape("&") '&' >>> saxutils.unescape(">") '>' >>> saxutils.unescape("A bunch of text with entities: & > <") Notice there is an optional parameter (a dict) that can be used to Matt You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||