Re: [Vala] Manipulating HTML tag soup in Vala




On Tue, Aug 2, 2016 at 9:04 AM, marcin saepia net <marcin saepia net> wrote:
how about 2-stage processing? Loading HTML into WebKitGtk, dumping DOM (https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebPage.html#webkit-web-page-get-dom-document) which contains already parsed structure, sanitizing DOM and displaying serialized version of modified DOM for the future use?

It should be more secure, too.

Thanks for the suggestion. I have thought about this approach, but there's a few things about handling HTML email that makes it tricky though: We want to this to happen without flashing a changing document at the user, we also want to ensure that bulk and junk messages that include bugged remote images and other resources do not lookup and/or load them when the HTML is parsed. Since this would need to be done as an out-of-process WebExtension, it's also all IPC, which is bad.

It may all may be possible, but it seems like just parsing and manipulating the markup before shipping it off to WebKit seems like it might be more robust and less work. I'll check with the WebKitGTK guys though.

Cheers,
//Mike

--
⊨ Michael Gratton, Percept Wrangler.
⚙ <http://mjog.vee.net/>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]