Added function for converting html special characters.

With entities there are problems encoding characters in other languages, for example á, ó, in spanish will become special characters.
This commit is contained in:
Carlos 2012-05-19 01:21:18 -05:00
parent 23a25b9abb
commit e057193de0
1 changed files with 13 additions and 0 deletions

View File

@ -45,6 +45,19 @@ public static function decode($value)
return html_entity_decode($value, ENT_QUOTES, Config::get('application.encoding'));
}
/**
* Convert HTML special characters.
*
* The encoding specified in the application configuration file will be used.
*
* @param string $value
* @return string
*/
public static function specialchars($value)
{
return htmlspecialchars($value, ENT_QUOTES, Config::get('application.encoding'), false);
}
/**
* Generate a link to a JavaScript file.
*