mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-23 19:03:02 +01:00
Return error when GET returns a non-plain text file
This commit is contained in:
parent
8507d637e5
commit
198c20db76
@ -202,6 +202,7 @@ assets.fetchText = async function(url) {
|
||||
const text = details.content.trim();
|
||||
if ( text.startsWith('<') && text.endsWith('>') ) {
|
||||
details.content = '';
|
||||
details.error = 'assets.fetchText(): Not a text file';
|
||||
}
|
||||
|
||||
// Important: Non empty text resource must always end with a newline
|
||||
|
Loading…
Reference in New Issue
Block a user