com web/master: Final clean-up. Stupid typo during testing elsewhere had me all kinds of FUBAR. Should finally fix all user note b0rking during
editing.: manage/user-notes.php
| From: | Daniel P. Brown | Date: | Thu, 10 May 2012 20:14:53 +0000 |
| Subject: | com web/master: Final clean-up. Stupid typo during testing elsewhere had me all kinds of FUBAR. Should finally fix all user note b0rking during editing.: manage/user-notes.php |
||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-13514@lists.php.net to get a copy of this message | ||
Commit: bc5cc4d1da2ce46c898ecabaa0205bf3f0f65416
Author: Daniel P. Brown <danbrown@php.net> Thu, 10 May 2012 16:14:53 -0400
Parents: aee9c2bf3d06154619e7f2a4c5478557fa19ee60
Branches: master
Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=bc5cc4d1da2ce46c898ecabaa0205bf3f0f65416
Log:
Final clean-up. Stupid typo during testing elsewhere had me all kinds of FUBAR. Should finally fix
all user note b0rking during editing.
Changed paths:
M manage/user-notes..php
Diff:
diff --git a/manage/user-notes.php b/manage/user-notes..php
index 2032cbd..f928a67 100644
--- a/manage/user-notes.php
+++ b/manage/user-notes.php
@@ -297,7 +297,7 @@ case 'edit':
$sect = (isset($_POST['sect']) ? escape($_POST['sect']) :
addslashes($row['sect']));
if (isset($note) && $action == "edit") {
- if (db_query("UPDATE note SET
note='".html_entity_decode($note)."',user='$email',sect='$sect',updated=NOW()
WHERE id=$id")) {
+ if (db_query("UPDATE note SET
note='".escape(html_entity_decode($note,ENT_QUOTES))."',user='$email',sect='$sect',updated=NOW()
WHERE id=$id")) {
// ** alerts **
//$mailto .= get_emails_for_sect($row["sect"]);
@@ -315,7 +315,7 @@ case 'edit':
}
}
- $note = isset($note) ? $note : addslashes($row['note']);
+ $note = isset($note) ? $note : $row['note'];
if ($action == "preview") {
echo "<p class=\"notepreview\">",strip($note),
@@ -335,7 +335,7 @@ case 'edit':
<td><input type="text" name="email" value="<?=
escape($email) ?>" size="30" maxlength="80" /></td>
</tr>
<tr>
- <td colspan="2"><textarea name="note" cols="70"
rows="15"><?= strip(strip(escape($note))) ?></textarea></td>
+ <td colspan="2"><textarea name="note" cols="70"
rows="15"><?= $note ?></textarea></td>
</tr>
<tr>
<td align="center" colspan="2">