A
Aljaz Fajmut
Hello,
I have a variable which holds the following html code:
<object width="425" height="344"><param name="movie"
value="
"></param><param
name="allowFullScreen" value="true"></param><param
name="allowscriptaccess" value="always"></param><embed
src="
"
type="application/x-shockwave-flash" allowscriptaccess="always"
allowfullscreen="true" width="425" height="344"></embed></object>
<span>some text<a href="..">link</a> .. </span>
Now I'd like to process it so that everything would be stripped except
object/param/embed tags (span tag and its content should be removed).
What is the best way to compliment that?
I've installed sanitize gem but it wont allow me to strip/remove content
inside html tags as well.
I though of regex but I'm unsure about this.
Many thanks for help!
I have a variable which holds the following html code:
<object width="425" height="344"><param name="movie"
value="
name="allowFullScreen" value="true"></param><param
name="allowscriptaccess" value="always"></param><embed
src="
type="application/x-shockwave-flash" allowscriptaccess="always"
allowfullscreen="true" width="425" height="344"></embed></object>
<span>some text<a href="..">link</a> .. </span>
Now I'd like to process it so that everything would be stripped except
object/param/embed tags (span tag and its content should be removed).
What is the best way to compliment that?
I've installed sanitize gem but it wont allow me to strip/remove content
inside html tags as well.
I though of regex but I'm unsure about this.
Many thanks for help!