I want CI Active Record to NOT escape certain html tags (e.g. iframe) - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: I want CI Active Record to NOT escape certain html tags (e.g. iframe) (/showthread.php?tid=43722) |
I want CI Active Record to NOT escape certain html tags (e.g. iframe) - El Forum - 07-21-2011 [eluser]mmatti[/eluser] When I'm trying to update database with some content that contains for instance <iframe> tag it escapes it- turning: Code: <object width="320" height="240" data="http://www.youtube.com/embed/H8v-qZFVYnc" type="application/x-shockwave-flash"><param name="src" value="http://www.youtube.com/embed/H8v-qZFVYnc" /></object> into: Code: & lt;object width="320" height="240" data="http://www.youtube.com/embed/H8v-qZFVYnc" type="application/x-shockwave-flash"& gt;& lt;param name="src" value="http://www.youtube.com/embed/H8v-qZFVYnc" /& gt;& lt;/object& gt; (added some spaces) Is there any way around it? I want CI Active Record to NOT escape certain html tags (e.g. iframe) - El Forum - 07-22-2011 [eluser]toopay[/eluser] In fact, thats safer rather than save the html tag in its actual tag! I want CI Active Record to NOT escape certain html tags (e.g. iframe) - El Forum - 07-26-2011 [eluser]mmatti[/eluser] so what should I do make it work and safe at the same time? I want CI Active Record to NOT escape certain html tags (e.g. iframe) - El Forum - 07-26-2011 [eluser]toopay[/eluser] Let the recent format runs. You can always revert that encoded html tag into the actual html tag by using Code: html_entity_decode($your_encoded_html); I want CI Active Record to NOT escape certain html tags (e.g. iframe) - El Forum - 07-27-2011 [eluser]mmatti[/eluser] it's working Many thanks. |