1
0
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:
Raymond Hill 2023-03-28 08:38:34 -04:00
parent 8507d637e5
commit 198c20db76
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -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