gordon.c Posted November 17, 2008 Share Posted November 17, 2008 Hi, I am trying to create a sort of application which would exchange html tags for plane text... that works quite fine but I cant find a solution how to convert " and ' It always gives me \" or \' but I would like to keep them the same but as a plane text so that the browser does not consider them as part of a tag. Do you have any hints how to do so? Thank you Link to comment https://forums.phpfreaks.com/topic/133042-solved-html-character-transform/ Share on other sites More sharing options...
DarkerAngel Posted November 17, 2008 Share Posted November 17, 2008 I'm not sure what your asking? stripslashes(); Link to comment https://forums.phpfreaks.com/topic/133042-solved-html-character-transform/#findComment-691913 Share on other sites More sharing options...
gordon.c Posted November 17, 2008 Author Share Posted November 17, 2008 The problem is that if I type into an input or whatever " or ' then I request to print them on page they always look like \" or \' Because without the slashes the browser considers them as a part of tag Link to comment https://forums.phpfreaks.com/topic/133042-solved-html-character-transform/#findComment-691943 Share on other sites More sharing options...
DarkerAngel Posted November 17, 2008 Share Posted November 17, 2008 That was the point of me telling you I'm not sure what your asking. How about htmlentities(stripslashes($string), ENT_QUOTES); is that what your looking for? Link to comment https://forums.phpfreaks.com/topic/133042-solved-html-character-transform/#findComment-691944 Share on other sites More sharing options...
gordon.c Posted November 17, 2008 Author Share Posted November 17, 2008 yes that works fine for me... thank you again Link to comment https://forums.phpfreaks.com/topic/133042-solved-html-character-transform/#findComment-691973 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.