Support Forum
I will do some more testing, but for if, for example, you have a post content with a in it... it gets escaped on the way in and if you dont remove slashes on the way out, you will end up with \... those are stored in the db vs quotes, for example...
Visit Cruise Talk Central and Mr Papa's World
Sorry for bringing up this topic again, but I had to share what I just learned since it didn't seem right that slashes were automatically being added (and then having to be removed): WordPress forces "addslashes" on all GET and POST variables. It runs this function on every page load in wp-settings.php and has been doing so since WP 2.5 (or even earlier -- I don't have any test installs from before then).
// Escape with wpdb. $_GET = add_magic_quotes( $_GET ); $_POST = add_magic_quotes( $_POST ); $_COOKIE = add_magic_quotes( $_COOKIE ); $_SERVER = add_magic_quotes( $_SERVER );
// Force REQUEST to be GET + POST. $_REQUEST = array_merge( $_GET, $_POST );}
So... we have to strip slashes because WordPress forced the slashes in there. Apparently they'd like to get rid of this behavior in the future, but because of the sheer number of plugins and servers and still use magic quotes, they continue to do this in order to "inject" some consistency across the board, even though it is generally accepted as undesirable behavior now.
yes, have been watching that wp discussion on removing that... will get very interesting if they do... actually would be best if they did, but could be nightmare, as you say, for folks - especially those who notoriously dont keep their plugins up to date... lol, have to roll my eyes when we help someone and I see 20 or 30 plugins with updates available...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)