Quatation Mark Glitch O_o

Forum
Last Post
Threads / Messages

shiann

Horse Tamer :3
Member
Joined
Jun 16, 2010
Messages
70
Points
0
Age
27
Mysidian Dollar
3,631
You\'ve

\"I\'m so sorry!\"

This is what shows up when I type " or '. How do I fix it...?

I lurked a lot, and couldn't find anything.. ;_;
 
Use stripslashes() & htmlspecialchars_decode()

PHP:
$string = "You\'ve";
$string = stripslashes($string); // You've

PHP:
$string = "\"I\'m so sorry!\"";
$string = htmlspecialchars($string); // "I'm so sorry!"
 
umm are you trying to do a quotation system for your adoptables site Shiann? This sounds interesting to me.
 
No, I was planning on using the quotation marks for the character interactions with the member.. But I may look into a quotation system, if I figure out what it is. :)
 
I've had issues with this as well.

@ fadillzzz: I'm a bit confused as to where the code is to be added to resolve the issue. Is this something put into the function page? Or is it to be specifically put on the pages where the issue is occurring?
 
You'll want to put it just before you use the string. Or you can put

PHP:
$article_content = stripslashes($article_content);

AFTER

PHP:
// clean all our data
$_POST = array_map('secure',$_POST);
$_GET = array_map('secure',$_GET);

in the functions page and that should effectively strip slashes from ALL of your content. But then BBCode wouldn't work I don't think.
 
That's so weird. I put it in the functions and for some reason it's still showing up everywhere.
 
I suggest that you only use it on certain pages where the glitch is happening, and probably place it right before the echo showpage

PHP:
$article_content = stripslashes($article_content);

echo showpage(...);
 
@ fadillzzz: Excellent! Thank you very much. That finally took care of the problem. I really appreciate the help.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,132
Members
1,603
Latest member
Monako
BETA

Latest Threads

Top