Re: convert html entities into real chars

2007-04-10 Thread Larry Bates
Laszlo Nagy wrote: > > Hi, > > I would like to have a function that can convert '>' into '>', > '&' into '&' etc. I could not find how to do it easily (I have a > code snippet for the opposite). > Thanks, > > Laszlo > You can use htmlentitydefs module to help with this. import htmlentityd

Re: convert html entities into real chars

2007-04-10 Thread Laszlo Nagy
> I would like to have a function that can convert '>' into '>', > '&' into '&' etc. I could not find how to do it easily (I have a > code snippet for the opposite). Found it, sorry def convertentity(m): """Convert a HTML entity into normal string (ISO-8859-1)""" if m.group(1)=='#':