diff options
author | Yasuo Ohgaki <yohgaki@php.net> | 2014-02-13 11:54:52 +0900 |
---|---|---|
committer | Yasuo Ohgaki <yohgaki@php.net> | 2014-02-13 11:54:52 +0900 |
commit | cbd108abf19d9fb9ae1d4ccd153215f56a2763e8 (patch) | |
tree | 8a0631208c010d7b4baab089d1a7e56d1f6e6d0e /ext/standard/html.c | |
parent | 06bbfe1e2a46d6c2eaf74b7c576b09114ee2e670 (diff) | |
download | php-git-cbd108abf19d9fb9ae1d4ccd153215f56a2763e8.tar.gz |
Implement RFC https://wiki.php.net/rfc/default_encoding
Diffstat (limited to 'ext/standard/html.c')
-rw-r--r-- | ext/standard/html.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/standard/html.c b/ext/standard/html.c index 91fc050add..075a4d2ff9 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -1432,8 +1432,8 @@ encode_amp: */ static void php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all) { - char *str, *hint_charset = NULL; - int str_len, hint_charset_len = 0; + char *str, *hint_charset = PHP_DEFAULT_CHARSET; + int str_len, hint_charset_len = sizeof(PHP_DEFAULT_CHARSET)-1; size_t new_len; long flags = ENT_COMPAT; char *replaced; @@ -1504,8 +1504,8 @@ PHP_FUNCTION(htmlspecialchars_decode) Convert all HTML entities to their applicable characters */ PHP_FUNCTION(html_entity_decode) { - char *str, *hint_charset = NULL; - int str_len, hint_charset_len = 0; + char *str, *hint_charset = PHP_DEFAULT_CHARSET; + int str_len, hint_charset_len = sizeof(PHP_DEFAULT_CHARSET)-1; size_t new_len = 0; long quote_style = ENT_COMPAT; char *replaced; |