php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37526 Preview fails to display slashes while submitting User Contributed Notes
Submitted: 2006-05-19 20:04 UTC Modified: 2006-09-05 13:18 UTC
From: sep16 at psu dot edu Assigned:
Status: Not a bug Package: Website problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sep16 at psu dot edu
New email:
PHP Version: OS:

 

 [2006-05-19 20:04 UTC] 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?


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-19 20:29 UTC] 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-20 19:23 UTC] sep16 at psu dot edu
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.
 [2006-09-05 13:18 UTC] bjori@php.net
dupe of bug#35190
(p.s. I removed the highlight_file() note, did not add any 
real value to the doc)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 15:01:35 2025 UTC