php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9156 stripslashes doesn't work as expected
Submitted: 2001-02-07 12:40 UTC Modified: 2001-04-16 05:25 UTC
From: nirf at sphera dot com Assigned:
Status: Closed Package: *Function Specific
PHP Version: 4.0.4pl1 OS: Linux RedHat 6.2
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: nirf at sphera dot com
New email:
PHP Version: OS:

 

 [2001-02-07 12:40 UTC] nirf at sphera dot com
when doing addslashes() to a string and then doing stripslashes() doesn't remove all occurance of single or double qoutes.
this is the string :

<TD><?=$Data_Source_Values["aliases"]->node[$i]['destination']?></TD>
				<TD a'><?=$Data_Source_Values['aliases']->node[$i]['type']?></TD>
				<TD><?=$Data_Source_Values['alias']->node[$i]['alias"sds]?></TD>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-08 03:50 UTC] nirf at sphera dot com
when using preg_replace all seems like addslashes had been processed on the string found in \\1 so if the programmer had already did addslashes on the string before preg_replace he gets \\1 after double addslashes which results in strings \" change to \\"
this might confuse users, and it might be added to the manual that all strings transfered to \\1 are escape (addslashes) by default.
 [2001-03-15 08:52 UTC] stas@php.net
For me, doing addslashes and then stripslashes on the
string, it comes out exactly as it was. Please provide
example of the code where it doesn't work.
 [2001-04-16 05:25 UTC] jmoore@php.net
Please try this with 4.0.5 when it is released and repoen report if the problem still persists. I cannot reproduce this behaviour either.

- James
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 01:01:28 2024 UTC