PDA

View Full Version : Backslashes everywhere O_O;


Clessidra
06-03-2013, 05:47 PM
So, everytime I enter an apostrophe a [wild] backslash appears!
Also, if I put an apostrophe in a shop title, I can no longer access the category with the shop with the apostrophe. :desudesudesu:

http://aristocracyalive.x10.mx/picuploads/png/3848a29a7931408b8a31d2fc42f9375e.png
http://aristocracyalive.x10.mx/picuploads/png/b73e19c9a3ed2cee7d9c6660f66ac7e4.png
http://aristocracyalive.x10.mx/picuploads/png/eb34e74a44f0bd381a9bc29b3bb732c3.png

Is there anyway to fix this?

River cat
06-03-2013, 09:49 PM
Oh, that's weird. And seems this splash is only before '. Are you absolutely sure, that you didn't do thay accidantly, some sort of typo?
Also, I think you should try to make new shop without using this sign '

*checked this on my site. You should never use this ' , it will add splaches (I got three, lol) and then you loose access to the all shops in the category where is the wrong shop.
You should delete this, and cerate new.

Clessidra
06-03-2013, 10:04 PM
I appreciate you trying to helping, but I already know that it occurs when using an apostrophe.

So, everytime I enter an apostrophe a [wild] backslash appears!


It occurs when using an apostrophe
It occurs in several places.
Editting the post with the backslashes will only create more.
It will make shop categories inaccessible if used in the shop name.


^Is what I know so far.
I removed it from my shop's name, but I'd still like to know how to fix it, if it's at all possible.

EasyRPG, another pet creator, had this issue when creating shop names with apostrophes, and it is still not fixed (Doug, why you no log on?). It was fixed from the forum though, which makes me hopeful that it can be fixed on this creator.

River cat
06-03-2013, 10:09 PM
Clessidra, aw, sorry, I missed several words, because of morning and damn english ^^"

Clessidra
06-03-2013, 10:12 PM
It's fine xD Thank you for the suggestions and help, either way :happycbig:

Nemesis
06-04-2013, 10:53 AM
back slash is an escape character. Meaning its telling the computer to treat your apostrophes as literals (literally an apostrophe), rather than code.

for example the string 'don't touch me'

could be misinterpreted by a computer as just 'don' while everything else after me could then be reinterpreted as a string even though it is code. so you escape it to get the right string length.

like this 'don/'t touch me'

This is probably caused by php having a certain setting on. I think its called magic quotes.

I am guessing all that data you entered was via text boxes on your website. so when you entered the data the first thing php does is escape code characters, like apostrophes and dollar signs. so that users can not inject code into your site.

It is a security measure though and usually after the data has been cleansed and scanned it should then strip the slashes. Also if the input data is already protected by admin password, all the incoming data should be treated as safe and not need to be checked.

Easiest fix I can think of right now is to go into your database or php files and manually take out the back slashes.

also in your php files that collect the data there should be a line of coding saying add_magic_quotes(); You would want to remove that.

Clessidra
06-04-2013, 11:43 AM
Thank you for the help! :happycbig:
I'll have my slav- I mean, Nieth, edit it in a bit. :angrygrin:

Nieth
06-04-2013, 04:30 PM
Thanks Nemesis. I can't seem to find that bit of code that you mentioned, so I'll just do everything manually for now.

Thanks again for the help.

Nemesis
06-05-2013, 01:37 PM
could also be called add_slashes() since magic quotes is deprecated. But some hosts have magic quotes set to on so it happens even if you don't explicitly use the code.

Nieth
06-05-2013, 07:27 PM
Thanks Nemesis, would you happen to know which file it may been in? I'm having trouble locating that one little piece of code. Even with the find feature.

Hall of Famer
06-10-2013, 07:03 PM
Well the script does add slashes to certain user input fields for security reasons, and in fact every modern script does that.

Nieth
06-10-2013, 09:15 PM
So, the only option is to go into the database every time and edit them out?