summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/php_ini.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/main/php_ini.c b/main/php_ini.c
index 61eb02ab38..38e2c70985 100644
--- a/main/php_ini.c
+++ b/main/php_ini.c
@@ -1,18 +1,18 @@
/*
+----------------------------------------------------------------------+
- | PHP version 4.0 |
+ | PHP version 4.0 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2001 The PHP Group |
+ | Copyright (c) 1997-2001 The PHP Group |
+----------------------------------------------------------------------+
- | This source file is subject to version 2.02 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available at through the world-wide-web at |
- | http://www.php.net/license/2_02.txt. |
+ | This source file is subject to version 2.02 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available at through the world-wide-web at |
+ | http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Author: Zeev Suraski <zeev@zend.com> |
+ | Author: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -26,6 +26,7 @@
#include "php_ini.h"
#include "ext/standard/dl.h"
#include "zend_extensions.h"
+#include "zend_highlight.h"
typedef struct _php_extension_lists {
zend_llist engine;
@@ -45,12 +46,13 @@ static void php_ini_displayer_cb(zend_ini_entry *ini_entry, int type)
ini_entry->displayer(ini_entry, type);
} else {
char *display_string;
- uint display_string_length;
+ uint display_string_length, esc_html=0;
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
if (ini_entry->orig_value) {
display_string = ini_entry->orig_value;
display_string_length = ini_entry->orig_value_length;
+ esc_html=1;
} else {
display_string = "<i>no value</i>";
display_string_length = sizeof("<i>no value</i>")-1;
@@ -58,11 +60,16 @@ static void php_ini_displayer_cb(zend_ini_entry *ini_entry, int type)
} else if (ini_entry->value && ini_entry->value[0]) {
display_string = ini_entry->value;
display_string_length = ini_entry->value_length;
+ esc_html=1;
} else {
display_string = "<i>no value</i>";
display_string_length = sizeof("<i>no value</i>")-1;
}
- PHPWRITE(display_string, display_string_length);
+ if(esc_html) {
+ zend_html_puts(display_string, display_string_length);
+ } else {
+ PHPWRITE(display_string, display_string_length);
+ }
}
}