proper parsing of html characters