[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: [PATCH] Allow/Deny some urls to be fetch in KHTMLPart
From: Luc Saillard <luc () saillard ! org>
Date: 2004-12-09 16:51:10
Message-ID: 20041209165110.GA11314 () sd291 ! sivit ! org
[Download RAW message or body]
Sorry, for some dumbs questions, but i haven't code in c++ for some years,
only in C, perl, python, ...
On Thu, Dec 09, 2004 at 04:22:02PM +0000, John Tapsell wrote:
> "put here because KHTMLPartPrivate, is not initialiazed when plugins is
> called"
>
> Won't this break bc?
bc ? == ? for binary compatibility, or program 'bc', or ABI
I'm not very good about ABI, but yes i think this will break binary, this is
why i hope this can be included in kde 3.4, and not kde3.3.x
If i put the list in the private section, we can't load the filter list in
the constructor of the plugin, but need to place a hook to be called when the
user open a page. And i don't know how to do this (cleverly).
> I'm not a good developer, so everything I say will probably be wrong.
>
> +void KHTMLPart::insertBlacklistUrl( const QString &url , bool is_regexp)
>
> It's not immediately clear to me whether url is the pretty version, or the
> encoded version. From the code, I see it's the encoded version (url.url()).
> Maybe this is obvious by everyone that would use the function?
I know this can be not obvious, the url in KHTMLPart::insertBlacklistUrl can
be a KURL, but i don't think this is useful to store a full class. With a
qstring or a char pointer, the list can take less memory and should be use
directly by some widget without convertion. But i agree, this can be changed.
> Also doing url.url() will give you all the stuff after the ? (like
> url="foo" will match http://asdf/search?this=foo;that=bar ) is this
> intentional? (consider where foo is a website name like google links)
While checking the url comes from Docloader that use a KURL and not a qstring
or char pointer. So i need to convert it to a qstring , and i prefer to use
the full url because some user want to block only image and not javascript
for example like:
^http://jupiter\.bravenet\.com/rover/f.*js=false [is a html page]
^http://jupiter\.bravenet\.com/rover/f [is a javascript page]
Perhaps one day, we want to not remove the content but replaces by an other
content (display a block gif, return a valid empty web js, ...).
It's just my 2 cents.
Luc
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic