From 98275f2f466f74a4833b852a81eb5bb39bfafab7 Mon Sep 17 00:00:00 2001 From: "Bill St. Clair" Date: Fri, 11 Jan 2008 11:28:32 -0500 Subject: [PATCH] html-encode/decode the text area --- grid-tutorial.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grid-tutorial.php b/grid-tutorial.php index 8d11382..95e9e63 100644 --- a/grid-tutorial.php +++ b/grid-tutorial.php @@ -125,11 +125,11 @@ if ($page != 'archive') { } else { if ($_POST['look_archive'] != '') { $res = $client->look_archive($look_hash, &$url); - if ($res != '') $content = $res['content']; + if ($res != '') $content = htmlspecialchars($res['content']); } elseif ($_POST['touch_archive'] != '') { $res = $client->touch_archive($touch_loc, &$url); if ($res != '') { - $content = $res['content']; + $content = htmlspecialchars($res['content']); if ($res['hash'] != '') $look_hash = $res['hash']; } } elseif ($_POST['buy_archive'] != '') { @@ -137,7 +137,7 @@ if ($page != 'archive') { } elseif ($_POST['sell_archive'] != '') { $res = $client->sell_archive($touch_loc, $buy_usage, &$url); } elseif ($_POST['write_archive'] != '') { - $res = $client->write_archive($touch_loc, $buy_usage, $content, &$url); + $res = $client->write_archive($touch_loc, $buy_usage, html_entity_decode($content), &$url); if ($res['hash'] != '') $look_hash = $res['hash']; } } -- 2.11.4.GIT