Decoding all HTML Entities
I’m looking for some function that will decode a good amount of HTML entities.
I’m looking for some function that will decode a good amount of HTML entities.
I’m using FreeTextBox editor to get some HTML created by users.
The problem with this is this editor is not converting special chars in HTML entities at exception of “<>”. I cannot use theHTML = Server.HtmlEncode(theHTML), because it converts all the HTML including tags and parameters, and I don’t want to create an unfinishable list of theHTML.Replace lines.
I’m parsing some HTML with Beautiful Soup 3, but it contains HTML entities which Beautiful Soup 3 doesn’t automatically decode for me:
How do you convert HTML entities to Unicode and vice versa in Python?