I'm using the python library SGMLParser to parse some html. I encounter an html tag of the form
<td class="school">Texas A&M</td>
I'd like to read out "Texas A&M". But when handle_data gets called, it gets called with "Texas A", and then, separately, "M" (quotes for clarity).
How do I replace the
&
string with an & before the call, without replacing all special ampersands in the whole string (some of which I may need).
Thanks!