mirror of https://github.com/gorhill/uBlock.git
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