Welcome Guest, Not a member yet? Register   Sign In
I want CI Active Record to NOT escape certain html tags (e.g. iframe)
#1

[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?
#2

[eluser]toopay[/eluser]
In fact, thats safer rather than save the html tag in its actual tag!
#3

[eluser]mmatti[/eluser]
so what should I do make it work and safe at the same time?
#4

[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);
#5

[eluser]mmatti[/eluser]
it's workingSmile
Many thanks.




Theme © iAndrew 2016 - Forum software by © MyBB