--- embedaddon/php/ext/standard/info.c 2012/05/29 12:34:43 1.1.1.2 +++ embedaddon/php/ext/standard/info.c 2013/10/14 08:02:34 1.1.1.4 @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2013 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: info.c,v 1.1.1.2 2012/05/29 12:34:43 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); } /* }}} */