Jump to content

Escaping string is not working


this.user

Recommended Posts

I am passing this value:

 

\\"''"""\""\\\\""""''''\"""\\\""''""""'/'/'/\"'\'\\'\\''\\'''''

 

the the following code is not handling it correctly:

 

 

$data = mysql_real_escape_string(strip_tags(htmlspecialchars($data)));

 

 

here is what it looks like when the server gets it:

 

\\"''"""\""\\\\""""''''\"""\\\""''""""'/'/'/\"'\'\\'\\''\\'''''

 

and here is after the code executes:

 

\\\\"\'\'"""\\""\\\\\\\\""""\'\'\'\'\\"""\\\\\\""\'\'""""\'/\'/\'/\\"\'\\\'\\\\\'\\\\\'\'\\\\\'\'\'\'\

 

Notice if I have

 

\'

 

it bugs out.

Link to comment
https://forums.phpfreaks.com/topic/219933-escaping-string-is-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.