note 65464 added to function.stripslashes

From: Date: Mon, 01 May 2006 12:05:12 +0000
Subject: note 65464 added to function.stripslashes
Groups: php.notes 
Request: Send a blank email to php-notes+get-110266@lists.php.net to get a copy of this message
why does it just strip all slashes, instead of just the slashes escaping stuff.. a normal slash with or without spaces in between or other characters not escaped by addslashes() should NOT be removed by this function!. \" should have it's \ removed so only " remains, C:\BLA\BLA.COM should not (not added by addslashes()) 3\4 should not either. also there should be a function that continues stripping the slashes added by addslashes until no change occurs anymore, for instance when addslashes was called multiple times in buggy environments. function noslashes ($string) { while ($string!=$tmp) { $tmp=$string; $string=stripslashes($tmp); } return($string); } this is the equivalent of just regexp replacing all \'es by nothing, and that's not the way it should work as far as i can see.. it -should- leave 'stand alone' slash characters alone! ---- Server IP: 194.109.193.119 Probable Submitter: 87.233.11.114 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.stripslashes.php Edit -- http://master.php.net/note/edit/65464 Del: integrated -- http://master.php.net/note/delete/65464/integrated Del: useless -- http://master.php.net/note/delete/65464/useless Del: bad code -- http://master.php.net/note/delete/65464/bad+code Del: spam -- http://master.php.net/note/delete/65464/spam Del: non-english -- http://master.php.net/note/delete/65464/non-english Del: in docs -- http://master.php.net/note/delete/65464/in+docs Del: other reasons-- http://master.php.net/note/delete/65464 Reject -- http://master.php.net/note/reject/65464 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#110266) next »