To get rid of the html codes, I suggest using a little custom alias that I've seen in several socket scripts called htmlfree.

Here's the alias, just call it using $htmlfree($1-)
alias -l htmlfree {
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
  return %x

I have no idea who wrote that originally, but appropriate credits/kudos to the person that did.