THESE FORUMS NOW CLOSED (read only)

  • 24 Apr 2024, 15:45
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Dear Jeph,  (Read 3028 times)

MikeMcG

  • Guest
Dear Jeph,
« on: 07 Jul 2008, 23:48 »

Please stripslashes() before you print out your news bits. =[
Logged

Cartilage Head

  • Only pretending to work
  • *****
  • Offline Offline
  • Posts: 2,182
  • Do Me Baby
Re: Dear Jeph,
« Reply #1 on: 09 Jul 2008, 22:38 »

Wat
Logged
Hate, rain on me

himynameisjulien

  • Guest
Re: Dear Jeph,
« Reply #2 on: 09 Jul 2008, 23:23 »

There is a thread for this, it's called Ask Jeph. It is, in fact, just above your thread. Maybe just below.
Logged

MikeMcG

  • Guest
Re: Dear Jeph,
« Reply #3 on: 12 Jul 2008, 13:37 »

This isn't a question. This is a demand. I think he's actually doing it now, 'cause this week's comic blurb didn't have escape characters.

Edit: I'm wrong, he's still not doing it.

Quote
Amir\'s optimism is virtually unchecked.

In programming, text is stored as strings and are represented by text wrapped in single or double quotes (depending on the language, single quotes might not exist. But for the sake of this discussion only PHP will exist). "This is a string" <- that is a string. 'This is also a string.' <- That is also a string. So, if you want to use a single quote or an apostrophe in a single quoted string you'd have to escape it; use a special character to say "Dude, don't think this is the end of the string." Hence 'This string won\'t end at won\'t \'cause I escaped it.' will be a complete string and won't die at won't. Most PHP configurations have something called magic_quotes (I think?) turned on, so any incoming POST or GET information is automatically escaped, and this might be the case for Jeff. Or, he might be escaping strings before he puts them into his database (database queries that insert information are strings and contain strings) so he doesn't accidentally destroy things. In either case he isn't removing the escapes before he outputs it. All it would take would be stripslashes($dbrow['blurb']); to get rid of those damn backslashes. Now you know.
« Last Edit: 13 Jul 2008, 22:00 by MikeMcG »
Logged
Pages: [1]   Go Up