Need help handling single quote and backslash for input text - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Need help handling single quote and backslash for input text (/showthread.php?tid=54918) |
Need help handling single quote and backslash for input text - El Forum - 10-01-2012 [eluser]agammill[/eluser] I'm allowing people to use the single quote ' and the backslash \ however on the ajax call, those characters are causing my code to choke. My plan was to replace those characters with characters that don't mess it up. Code: $my_input = str_replace("'","`",$post["my_input"]); Any ideas? Need help handling single quote and backslash for input text - El Forum - 10-01-2012 [eluser]CroNiX[/eluser] htmlentities()? |