#37526 [Opn]: Preview fails to display slashes while submitting User Contributed Notes

From: Date: Sat, 20 May 2006 19:23:17 +0000
Subject: #37526 [Opn]: Preview fails to display slashes while submitting User Contributed Notes
References: 1  Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-31581@lists.php.net to get a copy of this message
ID: 37526 User updated by: sep16 at psu dot edu Reported By: sep16 at psu dot edu Status: Open Bug Type: Website problem PHP Version: Irrelevant New Comment: I took a look at the source for /manual/add-note.php today, and it looks like the preview code needs to be updated to check get_gpc_magic_quotes() which appears to be stored in the global $MQ. Changing this (line 139 or so): manual_note_display(time(), stripslashes($user), stripslashes($note), FALSE); ...to this (as it is on lines 92 & 93): manual_note_display(time(), $MQ ? stripslashes($user): $user, $MQ ? stripslashes($note) : $note, FALSE); should solve this problem. Previous Comments: ------------------------------------------------------------------------ [2006-05-19 20:29:20] sep16 at psu dot edu (PS. I see at least someone else has experienced this issue as well, although I didn't see it in the bug list. See the user notes for highlight_file() -- messages 61269 and 61265 -- http://www.php.net/manual/en/function.highlight-file.php#61269) ------------------------------------------------------------------------ [2006-05-19 20:04:05] sep16 at psu dot edu Description: ------------ While I was submitting a user note this morning (preg_replace, #66344) I noticed that slashes were disappearing in the text rendered for the "Preview," so I escaped every slash (\) with an additional slash (\\) until the preview text showed up as I intended it. However, once I had submitted the note, it now showed ALL slashes, making the code incorrect, of course. I had previewed and edited several times before submitting the final note, and I'm certain it appeared correct before submitting. I think I was using us3.php.net. 1. In general, when text is rendered through the Preview button, backslashes disappear, but when actually adding a note they are all displayed. 2. Specifically, can my note be corrected or deleted? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37526&edit=1

« previous php.mirrors (#31581) next »