in reply to Re: Cleaning up HTML tags
in thread Cleaning up HTML tags
So far so good.
But I'm not seeing where massaging the rules about allowed and denied tags and attributes generates a win except it might make the checking easier to write.
The algorithm for filtering against the rules will still boil down to:
1. get a token which is either html markup or text. stop when none are left. 2. it the token is text, add it to the output 2. drop the tag if it's not allowed 3. drop each attibute not allowed 4. repeat
With a linear problem, I don't see what maintaining state wins for me unless the object accumulates a result for me as I intermittently obtain text to feed it with. Which I admit could be useful, but just not the way I've been programming.
UPDATE: actually, just as important issue than linearity in the sense above is the fact that there's only one thing to do with the object, and when you've done it, it's useful life is over.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cleaning up HTML tags
by mr_stru (Sexton) on Aug 26, 2003 at 03:03 UTC | |
by cleverett (Friar) on Aug 27, 2003 at 03:29 UTC |