Eric Dorsey wrote:
_So here is my program, I'm pulling some information off of my Snipt
feed .._
<snip>
I know, for example, that the > code means >, but what I don't know
is how to convert it in all my data to show properly? In all the
feedparser examples it just smoothly has the output correct
Why not str.replace()?
mystring = mystring.replace('>', '>')
(like in one
the data was <span>whatever</span> and it had the special characters
just fine.) I didn't notice any special call on their feedparser.parse()
and I can't seem to find anything in the feedparser documentation that
addresses this. Has anyone run into this before? Thanks!
It's because > is not the same as >. > is HTML escape sequence for
>, which means browser would substitute them to a real > instead of
considering it as part of html tags.
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor