diff --git a/driver-testsuite/web-fixtures/advanced_form_post.php b/driver-testsuite/web-fixtures/advanced_form_post.php index 755806dc6..dda1ee383 100644 --- a/driver-testsuite/web-fixtures/advanced_form_post.php +++ b/driver-testsuite/web-fixtures/advanced_form_post.php @@ -14,10 +14,13 @@ $_POST['agreement'] = isset($_POST['agreement']) ? 'on' : 'off'; ksort($_POST); -echo str_replace('>', '', var_export($_POST, true)) . "\n"; +foreach ($_POST as $key => $value) { + $post_for_printing[htmlspecialchars($key, ENT_QUOTES, 'UTF-8')] = htmlspecialchars(var_export($value, TRUE), ENT_QUOTES, 'UTF-8'); +} +echo str_replace('>', '', var_export($post_for_printing, true)) . "\n"; if (isset($_FILES['about']) && file_exists($_FILES['about']['tmp_name'])) { - echo $_FILES['about']['name'] . "\n"; - echo file_get_contents($_FILES['about']['tmp_name']); + echo htmlspecialchars($_FILES['about']['name'], ENT_QUOTES, 'UTF-8') . "\n"; + echo htmlspecialchars(file_get_contents($_FILES['about']['tmp_name'], ENT_QUOTES, 'UTF-8')); } else { echo "no file"; } diff --git a/driver-testsuite/web-fixtures/basic_form_post.php b/driver-testsuite/web-fixtures/basic_form_post.php index 8a5e340ef..751b27684 100644 --- a/driver-testsuite/web-fixtures/basic_form_post.php +++ b/driver-testsuite/web-fixtures/basic_form_post.php @@ -5,9 +5,8 @@ -

Anket for

- - Firstname: - Lastname: +

Anket for

+ Firstname: + Lastname: diff --git a/driver-testsuite/web-fixtures/basic_get_form.php b/driver-testsuite/web-fixtures/basic_get_form.php index a0b35166e..a84a2f83c 100644 --- a/driver-testsuite/web-fixtures/basic_get_form.php +++ b/driver-testsuite/web-fixtures/basic_get_form.php @@ -8,7 +8,7 @@

Basic Get Form Page

- +
diff --git a/driver-testsuite/web-fixtures/cookie_page2.php b/driver-testsuite/web-fixtures/cookie_page2.php index 22bcd1be1..97e5297e8 100644 --- a/driver-testsuite/web-fixtures/cookie_page2.php +++ b/driver-testsuite/web-fixtures/cookie_page2.php @@ -5,6 +5,6 @@ - Previous cookie: + Previous cookie: diff --git a/driver-testsuite/web-fixtures/issue130.php b/driver-testsuite/web-fixtures/issue130.php index 201d9826e..e19551ea4 100644 --- a/driver-testsuite/web-fixtures/issue130.php +++ b/driver-testsuite/web-fixtures/issue130.php @@ -5,7 +5,7 @@ if ('1' === $_GET['p']) { echo 'Go to 2'; } else { - echo ''.$_SERVER['HTTP_REFERER'].''; + echo ''.htmlspecialchars($_SERVER['HTTP_REFERER'], ENT_QUOTES, 'UTF-8').''; } ?> diff --git a/driver-testsuite/web-fixtures/issue140.php b/driver-testsuite/web-fixtures/issue140.php index 04a4cafb7..b98bbdfeb 100644 --- a/driver-testsuite/web-fixtures/issue140.php +++ b/driver-testsuite/web-fixtures/issue140.php @@ -2,7 +2,7 @@ if (!empty($_POST)) { setcookie("tc", $_POST['cookie_value'], null, '/'); } elseif (isset($_GET["show_value"])) { - echo $_COOKIE["tc"]; + echo htmlspecialchars($_COOKIE["tc"], ENT_QUOTES, 'UTF-8'); die(); } ?> diff --git a/driver-testsuite/web-fixtures/print_cookies.php b/driver-testsuite/web-fixtures/print_cookies.php index eef496ec5..3aea17973 100644 --- a/driver-testsuite/web-fixtures/print_cookies.php +++ b/driver-testsuite/web-fixtures/print_cookies.php @@ -5,6 +5,11 @@ - ', '', var_export($_COOKIE, true)); ?> + $value) { + $cookie_for_printing[htmlspecialchars($key, ENT_QUOTES, 'UTF-8')] = htmlspecialchars($value, ENT_QUOTES, 'UTF-8'); + } + ?> + ', '', var_export($cookie_for_printing, true)); ?>