Hmm... Magic_quotes or not, I've always read that using stripslashes is a good way to keep code portable and usable. I see that rouncube already uses stripslashes on a lot of things, but neglects to use it here. In previous versions of roundcube, this problem did not exist. Now it does. I think that's incorrect. On all of the PHP tools I have written in the past, people have always come back and complained that they were getting slashes on words (where I forgot to add stripslashes).
I always consider that you can't assume people will always have the same environment you will and you should write code to handle circumstances that you can handle to make things cross-platform. Adding two simple lines of stripslashes() isn't going to clutter the code anymore than it is now. On Fri, 17 Feb 2006 16:49:40 +0100, Håkan Lindqvist <[EMAIL PROTECTED]> wrote: > It is not silly, but I think you missed the point. > > I absolutely do not disagree that people are sending "broken" emails > around (where " has been escaped to \"). > > My point is that with a correctly set up PHP environment and provided > that the Roundcube code is reasonable, the slashes should NOT appear in > the first place and thus stripslashes is not necessary. > > If it does appear, you should check that your PHP environment is sane > (magic_quotes in particular should be off), otherwise something is > broken in Roundcube, and then that should be fixed. > > Adding random stripslashes calls just makes a mess of things. > > > /Håkan > > On fre, 2006-02-17 at 10:21 -0500, Dean Jones wrote: >> Umm... That's silly. They're definitely needed. Try sending an e-mail > and put quotes around something or use a single quote. The message ends up > like this: >> >> He said \"Hi\" >> >> and >> >> Wouldn\'t you like to know. >> >> >> Using stripslashes removes those uneccessary escape slashes around > quotes. >> >> It's absolutely needed. >> >> >> >> On Fri, 17 Feb 2006 10:08:41 +0100, Håkan Lindqvist > <[EMAIL PROTECTED]> wrote: >> > I don't understand why it should be necessary to use stripslashes in > the >> > first place. The slashes shouldn't be there in the first place, except >> > in SQL queries. >> > >> > To me it seems that stripslashes isn't what we're looking for. >> > >> > >> > /Håkan >> > >> > On tor, 2006-02-16 at 22:47 -0500, Dean Jones wrote: >> >> Look like someone forgot to use stripslashes on the subject and body > of >> > the >> >> messages... :) >> >> >> >> Is there a standard for checking in patches if you have access to > CVS? >> > I've >> >> fixed this, but I wanted to check and see what the procedure was for >> > checking >> >> in small fixes like this. >> >> >> >> Dean >> >> >> >> >> >> >> > >> > >> >> >> >> > >
