Function Repository Resource:

DecodeHTMLCharacterEntities

Source Notebook

Decode HTML character entities in a string with their regular Unicode characters

Contributed by: Arnoud Buzing

ResourceFunction["DecodeHTMLCharacterEntities"][string]

decodes the HTML character entities in the given string.

Details

ResourceFunction["DecodeHTMLCharacterEntities"] uses Python with the html library.

Examples

Basic Examples (1) 

Replace HTML character entities with Unicode characters:

In[1]:=
ResourceFunction["DecodeHTMLCharacterEntities"]["a < b"]
Out[1]=
In[2]:=
ResourceFunction["DecodeHTMLCharacterEntities"]["€500"]
Out[2]=
In[3]:=
ResourceFunction[
 "DecodeHTMLCharacterEntities"]["Limit[1/x,x->∞]"]
Out[3]=

Possible Issues (1) 

This function expects expects one argument and it must be a string. Anything else will give a Failure:

In[4]:=
ResourceFunction["DecodeHTMLCharacterEntities"][42, "s"]
Out[4]=

Publisher

Arnoud Buzing

Requirements

Wolfram Language 14.0 (January 2024) or above

Version History

  • 1.0.0 – 06 September 2024

License Information