drewgg
4/26/2016 - 2:55 PM

Unescapes HTML escaped character to UTF-8

Unescapes HTML escaped character to UTF-8

<?php

/**
* Unescapes HTML escaped character to UTF-8
*
* We can't have escaped characters in email subject lines so we need to make sure they're
* converted to the actual UTF-8 character. ie, converts..
*
* &#169; ---> ©
* &copy; ---> ©
*
* @static
* @access	public
* @param	string		$str The string to process
* @return	string		The processed string
*/
public static function undoEscapes($str)
{
	return html_entity_decode($str, ENT_QUOTES, 'UTF-8');
}

?>