diff --git a/utils.hh b/utils.hh index 76661c6e..b71f7527 100644 --- a/utils.hh +++ b/utils.hh @@ -84,10 +84,10 @@ inline bool isExternalLink(QUrl const &url) { url.scheme() == "file" || url.toString().startsWith( "//" ); } -inline bool isCssFontImage(QUrl const &url) { +inline bool isHtmlResources(QUrl const &url) { auto fileName = url.fileName(); auto ext=fileName.mid(fileName.lastIndexOf(".")); - QStringList extensions{".css",".woff",".woff2","ttf",".bmp" ,".jpg", ".png", ".tif",".wav", ".ogg", ".oga", ".mp3", ".mp4", ".aac", ".flac",".mid", ".wv ",".ape"} ; + QStringList extensions{".css",".woff",".woff2","ttf",".bmp" ,".jpg", ".png",".gif", ".tif",".wav", ".ogg", ".oga", ".mp3", ".mp4", ".aac", ".flac",".mid", ".wv",".ape"} ; return extensions.indexOf(ext)>-1; } diff --git a/weburlrequestinterceptor.cpp b/weburlrequestinterceptor.cpp index 48573288..b817d0e0 100644 --- a/weburlrequestinterceptor.cpp +++ b/weburlrequestinterceptor.cpp @@ -21,7 +21,7 @@ void WebUrlRequestInterceptor::interceptRequest( QWebEngineUrlRequestInfo &info) //whitelist url does not block return; } - if(Utils::isCssFontImage(info.requestUrl())){ + if(Utils::isHtmlResources(info.requestUrl())){ //let throuth the resources file. return; }