I want CI Active Record to NOT escape certain html tags (e.g. iframe) |
[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?
[eluser]toopay[/eluser]
In fact, thats safer rather than save the html tag in its actual tag!
[eluser]mmatti[/eluser]
so what should I do make it work and safe at the same time?
[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);
|
Welcome Guest, Not a member yet? Register Sign In |