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? 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. 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? 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. Link to comment https://forums.phpfreaks.com/topic/173913-returning-php/#findComment-916780 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.