sounds to me like you are not running your mysql_real_escape_string and stripslashes at the right time. I'm not really sure what the data flow is in your site though so it's difficult to figure it out.
If you organize your code properly, it should never be necessary to reverse mysql_escape_string. I'm not sure why you are using stripslashes but my guess is that you are trying to reverse magic_quotes. You should be more careful about that too.
Generally speaking, you should only use stripslashes to get rid of magic quotes if [man]get_magic_quotes_gpc[/man] returns true.
Also, you should only run [man]mysql_real_escape_string[/man] ONCE on your data RIGHT BEFORE you insert it into your database and ONLY AFTER you have already stripslashed the text and ONLY IF the field is a text field.