mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
opt:add wikipedia url to whitelist.
This commit is contained in:
parent
e54b6e58d8
commit
ceb4a00d2e
|
@ -15,6 +15,7 @@
|
|||
#include "utils.hh"
|
||||
|
||||
#include <QRegularExpression>
|
||||
#include "globalbroadcaster.h"
|
||||
|
||||
namespace MediaWiki {
|
||||
|
||||
|
@ -125,6 +126,8 @@ MediaWikiWordSearchRequest::MediaWikiWordSearchRequest( wstring const & str,
|
|||
GD_DPRINTF( "request begin\n" );
|
||||
QUrl reqUrl( url + "/api.php?action=query&list=allpages&aplimit=40&format=xml" );
|
||||
|
||||
GlobalBroadcaster::instance()->addWhitelist( reqUrl.host() );
|
||||
|
||||
Utils::Url::addQueryItem( reqUrl, "apfrom", gd::toQString( str ).replace( '+', "%2B" ) );
|
||||
|
||||
netReply = mgr.get( QNetworkRequest( reqUrl ) );
|
||||
|
|
Loading…
Reference in a new issue