Hey folks,
CodeIgniter is brilliant but I'm using it to develop a site where users need to be able to share their code for websites. Unfortunately, CodeIgniter has been doing the "right" thing by removing <script>
tags from my user's inputs into the database, so when it's returned data looks like this:
[removed] User's data [removed]
However, I need my site to DISPLAY script tags but obviously not PARSE them. How can I get CodeIgniter or PHP to return <script>
tags, but still sanitise them for the database and return them without them executing?
Thanks!
Jack
EDIT: By the way, it's not an option to use stuff like Markdown, everything has to output to copy-pastable code that could work with no modification somewhere else