Project

General

Profile

Feature #32

Process HTML files in data: URLs instead of just blocking them

Added by koszko 5 months ago. Updated 3 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
07/01/2021
Due date:
% Done:

0%

Estimated time:

Description

Content scripts are said not to get loaded to pages opened from data: URLs. We're currently blocking data: page links entirely. We could, however, make it better and parse each data: URL as HTML, sanitize the resulting document and encode it back into a data: URL.

History

#2

Updated by jahoti 3 months ago

It might be possible to utilize this API:

https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler

Unfortunately not, according to https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler#permitted_schemes the API can't be used to register a handler for data:, nor can the more powerful manifest key protocol_handlers.

#3

Updated by koszko 3 months ago

:/
Btw, I've been unaware of that manifest key. It would be cool to utilize it for something else at some point :) Although I haven't found any evidence of it being supported in Chromium :/

#4

Updated by jahoti 3 months ago

Btw, I've been unaware of that manifest key. It would be cool to utilize it for something else at some point :) Although I haven't found any evidence of it being supported in Chromium :/

It would indeed seem it isn't; nevertheless, working around that using navigation.registerProtocolHandler and some request redirection might be possible. The biggest problem is probably deciding exactly what to do :).

Also available in: Atom PDF