MyBB Community Forums

Full Version: Strange error [Apostrophe shows up with slash]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi, when someone posts a word with a ' in it it shows a slash to.

EG: haven't shows haven\'t when it's posted

Anyone know why?

PS: It seems when a slash is posted it adds more slashes after that aswell Sad

If it helps, recently I restored my old database thorugh PHPMyAdmin onto my new server, but I don't think I disabled the plugins before the backup and now they aren't on the new server I can't disable them because they aren't there
MyBB should remove the backslashes before it sends the post to the database...so it is strange that they are appearing even when a new post is posted...

Can you put this code in a php file and upload it to your site and then run it through a browser and tell me the result?

<?php echo(stripslashes("Hello I\'m feeling great!")); ?>
That shows up fine without the slash;

Quote:Hello I'm feeling great!
Ok, that is weird. Do you mind me having a link to your forum at all? You can PM me if you don't want it made public.

All versions of MyBB get rid of the slashes before they send the information to the database...and that works in my file...weird.
The thing is, even if you have magic quotes on it should strip them away.
Works fine here -> http://www.njgaming.ej.am/forum/showthre...91#pid1291 . 0.o
CraKteR Wrote:The thing is, even if you have magic quotes on it should strip them away.
Works fine here -> http://www.njgaming.ej.am/forum/showthre...91#pid1291 . 0.o

If I were to edit that it would probably add them in.

It only started recently Sad
Does it only do that for you then? Confused
Nope it did it for someone that signed up earlier today, and then DrPoodle just signed up and tested and it happened when he posted aswell.

EDIT: I saw that it's something to do with magic_quotes_gpc? Is that right?
It might be. But we strip the incoming variables whenever magic_quotes_gpc is on.
Pages: 1 2