Drummer_si
04-24-2006, 06:34 AM
At present i'm currently using the following code to strip out certain HTML tags:
</?(.|script|embed|font|object|frameset|frame|iframe|meta|link|style|span|class|p)(.|style|class)(.|\n )*?>
however this only strips out those tags that don't have additional values in it.
Eg. It won't strip out <FONT TYPE="WHATEVER">, Because of the TYPE attribute.. Any ways around this?
Also, I wish to remove certain attributes from tags without removing the tag itself. For example, I with to remove all formatting from P tags whilst keeping the P tags intact. EG going from this: <P STYLE="WHATEVER"> to this: <p>
If anyone can help me out on this I'd greatly appreciate it :)
</?(.|script|embed|font|object|frameset|frame|iframe|meta|link|style|span|class|p)(.|style|class)(.|\n )*?>
however this only strips out those tags that don't have additional values in it.
Eg. It won't strip out <FONT TYPE="WHATEVER">, Because of the TYPE attribute.. Any ways around this?
Also, I wish to remove certain attributes from tags without removing the tag itself. For example, I with to remove all formatting from P tags whilst keeping the P tags intact. EG going from this: <P STYLE="WHATEVER"> to this: <p>
If anyone can help me out on this I'd greatly appreciate it :)