aQ Posted August 14, 2007 Share Posted August 14, 2007 Hello! I am looking for a function (I know it exists, but I don't know it's name), that adds a \ in front of " and '. I want to do this, to let me post html codes in my home-made cms. Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/64833-add-to-and/ Share on other sites More sharing options...
Aureole Posted August 14, 2007 Share Posted August 14, 2007 htmlentities() I think to be honest...but not sure. Maybe you could use addslashes() before input and stripslashes() after? Quote Link to comment https://forums.phpfreaks.com/topic/64833-add-to-and/#findComment-323500 Share on other sites More sharing options...
aQ Posted August 14, 2007 Author Share Posted August 14, 2007 That will, as far as I can see, only make the html into < etc. I want the html to display as it is when the page shows, but still be able to add html to my pages using my cms. Quote Link to comment https://forums.phpfreaks.com/topic/64833-add-to-and/#findComment-323505 Share on other sites More sharing options...
aQ Posted August 14, 2007 Author Share Posted August 14, 2007 Addslashes worked. Didn't see that you edited your post. Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/64833-add-to-and/#findComment-323521 Share on other sites More sharing options...
Aureole Posted August 14, 2007 Share Posted August 14, 2007 No problem. Quote Link to comment https://forums.phpfreaks.com/topic/64833-add-to-and/#findComment-323524 Share on other sites More sharing options...
PhaZZed Posted August 14, 2007 Share Posted August 14, 2007 Good old addslashes, strip_slashes, urlencode and urldecode, my precious babies Quote Link to comment https://forums.phpfreaks.com/topic/64833-add-to-and/#findComment-323561 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.