h***@public.gmane.org
2011-06-09 09:49:13 UTC
Status: New
Owner: ----
New issue 185 by kos...-***@public.gmane.org: Make new-style HTMLTokenizer
http://code.google.com/p/html5lib/issues/detail?id=185
Ok, I'll describe the whole problem.
I had a task for creating html sanitizer that keeps iframe's for youtube
videos. I ended up with a sanitizer mixin, that when it sees a youtube
iframe, it starts to skip all new elements until next /iframe.
So since HTMLTokenizer is old-style class -- __init__ in my sanitizer mixin
wouldn't be called and I won't be able to set self.skip_until_iframe =
False in it.
My tests showed that performance is the same.
Attachments:
newstyle_tokenizer.diff 588 bytes
Owner: ----
New issue 185 by kos...-***@public.gmane.org: Make new-style HTMLTokenizer
http://code.google.com/p/html5lib/issues/detail?id=185
Ok, I'll describe the whole problem.
I had a task for creating html sanitizer that keeps iframe's for youtube
videos. I ended up with a sanitizer mixin, that when it sees a youtube
iframe, it starts to skip all new elements until next /iframe.
So since HTMLTokenizer is old-style class -- __init__ in my sanitizer mixin
wouldn't be called and I won't be able to set self.skip_until_iframe =
False in it.
My tests showed that performance is the same.
Attachments:
newstyle_tokenizer.diff 588 bytes
--
You received this message because you are subscribed to the Google Groups "html5lib-discuss" group.
To post to this group, send an email to html5lib-discuss-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to html5lib-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/html5lib-discuss?hl=en-GB.
You received this message because you are subscribed to the Google Groups "html5lib-discuss" group.
To post to this group, send an email to html5lib-discuss-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to html5lib-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/html5lib-discuss?hl=en-GB.