A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mail-archive.com/html5lib-discuss@googlegroups.com/msg00546.html below:

Issue 185 in html5lib: Make new-style HTMLTokenizer

Status: New
Owner: ----

New issue 185 by kos...@gmail.com: 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@googlegroups.com.
To unsubscribe from this group, send email to 
html5lib-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/html5lib-discuss?hl=en-GB.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4