Jump to content

[SOLVED] Escapism


rarebit

Recommended Posts

Hi,

I seem to be having trouble with the whole escaping and htmlspecialchars thing...

 

I've set up my own way of installing data into mysql. When installing I parse the data with 'mysql_real_escape_string()', before inserting.

 

Then later when it's put into a form element I 'strip_tags()' and 'htmlspecialchars()', yet it still outputs '\ in the form, in actual fact outputting \’ .

 

However if I delete the offending slash then update the form it's ok. It's also ok when I input data directly into the form and update (multiple times...) and that uses the same process as when it's installed. So why the difference and how to solve please?

 

Rob

Link to comment
https://forums.phpfreaks.com/topic/108225-solved-escapism/
Share on other sites

mmm, i'd forgotten to mention stripslashes. Yet after a couple of hours of mind numbing check, uninstalling and installing, I realise it's actually one of the modules and not the base system and here it is already pre-escaped and therefore escaped on both parts...

 

Sorry about that and thanks!

Link to comment
https://forums.phpfreaks.com/topic/108225-solved-escapism/#findComment-554890
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.