Bug 249394

Summary: An adblock filter blocks konqueror icons
Product: [Applications] konqueror Reporter: Dimitrios Glentadakis <dglent>
Component: khtml adblockAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: adawit, deus_ex_machin, KaiUweBroulik2, maksim
Priority: NOR    
Version: 4.5.0   
Target Milestone: ---   
Platform: Mandriva RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 4.6.1
Sentry Crash Report:

Description Dimitrios Glentadakis 2010-08-29 12:01:28 UTC
Version:           4.5.0 (using KDE 4.5.0) 
OS:                Linux

The adblock filter NLBlock http://www.verzijlbergh.com/adblock/nlblock.txt blocks konqueror icons in introduction page, and in all phpbb3 forums

Reproducible: Always
Comment 1 Maksim Orlovich 2010-08-29 17:59:47 UTC
konqueror(4701)/khtml (dom) KHTMLSettings::isAdFiltered: BLOCKED: "file:///opt/kde42/share/icons/oxygen/16x16/actions/go-next.png" "/i?" "[

Seems like we mis-interpret the ? as a wildcard here.
Comment 2 Maksim Orlovich 2010-08-30 17:34:40 UTC
SVN commit 1170033 by orlovich:

At least don't intrepret ? as a wildcard in strings that don't have *. We really 
should escape it even if they do (using WildcardUnix), but QRegExp's wildcard parsing looks so busted 
my brain is rebelling against writing a guaranteed-to-be-wrong escaping function --- probably being 
overpedantic pedantic here, though.

I guess the proper fix would be to do our own parser; and to add some of the URL-specific magic 
adblock+ has while I am at it... 

CCBUG: 249394


 M  +1 -1      khtml_filter.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1170033
Comment 3 Maksim Orlovich 2010-08-30 17:36:19 UTC
SVN commit 1170035 by orlovich:

Merged revision:r1170033 | orlovich | 2010-08-30 11:43:04 -0400 (Mon, 30 Aug 2010) | 10 lines

At least don't intrepret ? as a wildcard in strings that don't have *. We really 
should escape it even if they do (using WildcardUnix), but QRegExp's wildcard parsing looks so busted 
my brain is rebelling against writing a guaranteed-to-be-wrong escaping function --- probably being 
overpedantic pedantic here, though.

I guess the proper fix would be to do our own parser; and to add some of the URL-specific magic 
adblock+ has while I am at it... 

CCBUG: 249394

 M  +1 -1      khtml_filter.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1170035
Comment 4 Kai Uwe Broulik 2010-08-30 23:41:00 UTC
But the main thing is: The adblock filter should not apply on KDE‘s own introduction and help pages?
Comment 5 JK 2011-02-04 19:57:19 UTC
This bug has had some /nasty/ implications for me. Since 4.5.4 I've noticed all attachment icons & emoticons in kmail, emoticons in kopete and images in ktorrent searches don't display (being replaced with a frame containing a broken image icon in the top left corner). This is in addition to the same broken image icons displaying in konqeror.

After turning adblock filtering off in _konqueror_, the images display correctly again _system wide_! This is 100% reproducible for me:

- Turn on adblock filtering in konqeror 
- Restart kmail (attachment icons & all emoticons are broken). Same for kopete & ktorrent.
- Turn off adblock filtering in konqueror & restart other apps. Images are back.

KDE: 4.5.4 -- 4.6.0
Packages: Gentoo (amd64)
Comment 6 Dawit Alemayehu 2011-02-06 18:12:36 UTC
Fixed for 4.6.1. See http://git.reviewboard.kde.org/r/100572/
Comment 7 Dimitrios Glentadakis 2015-05-27 03:48:28 UTC
Repetition here:
https://bugs.kde.org/show_bug.cgi?id=344013