ngreenwood6 Posted September 11, 2009 Share Posted September 11, 2009 I am trying to return some data as an xml file. However, whenever I try to return the data it is getting changed. For example if I put in: <post>test</post> It is getting changed to: <post>test</post> Is there any way that I can make it keep the "<>" signs? Quote Link to comment https://forums.phpfreaks.com/topic/173913-returning-php/ Share on other sites More sharing options...
Adam Posted September 11, 2009 Share Posted September 11, 2009 Somewhere in your code the htmlspecialchars function or similar is being applied to the data. This is generally to prevent XSS attacks, so ensure that it won't effect any other output before removing it. Quote Link to comment https://forums.phpfreaks.com/topic/173913-returning-php/#findComment-916763 Share on other sites More sharing options...
ngreenwood6 Posted September 11, 2009 Author Share Posted September 11, 2009 I kinda figured that was happening. Is there any function to change them back once they have been changed or even a way to convert them? Quote Link to comment https://forums.phpfreaks.com/topic/173913-returning-php/#findComment-916770 Share on other sites More sharing options...
Adam Posted September 11, 2009 Share Posted September 11, 2009 Give html_entity_decode a bash. Quote Link to comment https://forums.phpfreaks.com/topic/173913-returning-php/#findComment-916780 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.