cvs: phpweb /manual add-note.php
| From: | Jim Winstead | Date: | Mon, 26 Feb 2001 22:58:17 +0000 |
| Subject: | cvs: phpweb /manual add-note.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-4049@lists.php.net to get a copy of this message | ||
jimw Mon Feb 26 14:58:17 2001 EDT
Modified files:
/phpweb/manual add-note.php
Log:
fix typo, stop encoding <? in notes
Index: phpweb/manual/add-note.php
diff -u phpweb/manual/add-note.php:1.13 phpweb/manual/add-note.php:1.14
--- phpweb/manual/add-note.php:1.13 Mon Feb 26 14:55:47 2001
+++ phpweb/manual/add-note.php Mon Feb 26 14:58:16 2001
@@ -46,13 +46,10 @@
if (isset($note)):
$now = date("Y-m-d H:i:s");
$query = "INSERT INTO note (user, note, sect, ts, lang) VALUES ";
- # protect all HTML-like stuff (may be "Joe Blow <joe@blow.com>")
+ # protect all HTML-like stuff in email (for "Joe Blow <joe@blow.com>")
$query .= "('" . htmlspecialchars($user) . "',";
- # only protect PHP-code start tags.
- $query .= "'" . ereg_replace("<\\?", "<?", $note) .
"',";
- # or we could protect all HTML
- #$query .= "'" . htmlspecialchars($note) . "',";
- $query .= "'$sect','$now',$lang')";
+ # we don't encode the rest because the output side handles things
+ $query .=
"'$note','$sect','$now','$lang')";
//echo "<!--$query-->\n";
if (mysql_query($query)):?>
<P>Your submission was successful -- thanks for contributing!