Use html_entity_decode() instead of your custom code.

This also improves our PHP 5.5 compatibility a bit since both regular expressions used in that method throw E_DEPRECATED in PHP 5.5.