1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-01 11:50:28 +02:00

- Modify hash format to be more intuitive

- Add parameter that controls magic quotes processing in loadArrayFromForm

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1107 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-28 03:55:36 +00:00
parent 8913239b7f
commit dea62ffdab
5 changed files with 15 additions and 9 deletions

View File

@@ -300,10 +300,12 @@ class HTMLPurifier_Config
/**
* Loads configuration values from $_GET/$_POST that were posted
* via ConfigForm
* @param $array $_GET or $_POST array to import
* @param $mq_fix Boolean whether or not to enable magic quotes fix
* @static
*/
function loadArrayFromForm($array) {
$mq = get_magic_quotes_gpc();
function loadArrayFromForm($array, $mq_fix = true) {
$mq = get_magic_quotes_gpc() && $mq_fix;
foreach ($array as $key => $value) {
if (!strncmp($key, 'Null_', 5) && !empty($value)) {
unset($array[substr($key, 5)]);