def normalize(string)
      new_body = normalize_entities(string)
      # Fix mismatched tags. Yes, it's faster to do it per-message
      # than all at once.
      new_body = Pipio::TagBalancer.new(new_body).balance
      if @sender_alias[0,3] == '***'
        # "***<alias>" is what pidgin sets as the alias for a /me action
        @sender_alias.slice!(0,3)
        new_body = "*#{new_body}*"
      end

      new_body
    end
def normalize(string)
      new_body = normalize_entities(string)
      # Fix mismatched tags. Yes, it's faster to do it per-message
      # than all at once.
      new_body = Pipio::TagBalancer.new(new_body).balance
      if @sender_alias[0,3] == '***'
        # "***<alias>" is what pidgin sets as the alias for a /me action
        @sender_alias.slice!(0,3)
        new_body = "*#{new_body}*"
      end

      new_body
    end
Balances mismatched tags, normalizes body style, and fixes actions
 so they are in Adium style (Pidgin uses "***Buddy waves at you", Adium uses
 "*Buddy waves at you*").