php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7128 Decoding of form variables
Submitted: 2000-10-11 01:50 UTC Modified: 2000-10-11 02:39 UTC
From: users at freesurf dot ch Assigned:
Status: Closed Package: PWS related
PHP Version: 4.0.2 OS: WIN98
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: users at freesurf dot ch
New email:
PHP Version: OS:

 

 [2000-10-11 01:50 UTC] users at freesurf dot ch
When receving values from a form text field such as

 <INPUT name="hugo" type="text">

any entered ['] is preceedet with an [\] in the variable $hugo. Thus:

 [it's a shame] becomes "it\'s a shame".

1. I don't see any reason for it.

2. I tried to solve the problem using preg_replace:

 preg_replace('~\/\'~','\'',$hugo);

...without any effect.

 preg_replace('~\134\'~','/',$hugo);

indeed works fine! An error?!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-11 02:00 UTC] brad@php.net
This isn't a bug. Use stripslashes() to remove the slashes from the output
 [2000-10-11 02:39 UTC] rasmus@php.net
1. If you did any database work the reason should be obvious.

2. Either use stripslashes() or turn off gpc_magicquotes in your php.ini file.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 02:01:29 2024 UTC