'Convert numeric character reference notation to unicode string

Is there a standard, preferably Pythonic, way to convert the &#xxxx; notation to a proper unicode string?

For example,

מפגשי

Should be converted to:

מפגשי

It can be done - quite easily - using string manipulations, but I wonder if there's a standard library for this.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source