--- embedaddon/php/ext/standard/info.c 2013/07/22 01:32:05 1.1.1.3 +++ embedaddon/php/ext/standard/info.c 2013/10/14 08:02:34 1.1.1.4 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: info.c,v 1.1.1.3 2013/07/22 01:32:05 misho Exp $ */ +/* $Id: info.c,v 1.1.1.4 2013/10/14 08:02:34 misho Exp $ */ #include "php.h" #include "php_ini.h" @@ -125,7 +125,11 @@ static void php_info_print_stream_hash(const char *nam zend_hash_internal_pointer_reset_ex(ht, &pos); while (zend_hash_get_current_key_ex(ht, &key, &len, NULL, 0, &pos) == HASH_KEY_IS_STRING) { - php_info_print(key); + if (!sapi_module.phpinfo_as_text) { + php_info_print_html_esc(key, len-1); + } else { + php_info_print(key); + } zend_hash_move_forward_ex(ht, &pos); if (zend_hash_get_current_key_ex(ht, &key, &len, NULL, 0, &pos) == HASH_KEY_IS_STRING) { php_info_print(", "); @@ -291,7 +295,7 @@ void php_info_print_style(TSRMLS_D) PHPAPI char *php_info_html_esc(char *string TSRMLS_DC) { size_t new_len; - return php_escape_html_entities(string, strlen(string), &new_len, 0, ENT_QUOTES, NULL TSRMLS_CC); + return php_escape_html_entities((unsigned char *) string, strlen(string), &new_len, 0, ENT_QUOTES, NULL TSRMLS_CC); } /* }}} */