fix:website dictionary url decode url

This commit is contained in:
Xiao YiFang 2022-09-07 21:38:30 +08:00
parent 7bbc70190e
commit 4098b61634

View file

@ -10,7 +10,8 @@ void IframeSchemeHandler::requestStarted(QWebEngineUrlRequestJob *requestJob)
QUrl url = requestJob->requestUrl(); QUrl url = requestJob->requestUrl();
// website dictionary iframe url // website dictionary iframe url
url = QUrl( Utils::Url::queryItemValue( url, "url" ) ); auto websiteUrl=QUrl::fromPercentEncoding( Utils::Url::queryItemValue( url, "url" ).toUtf8());
url = QUrl( websiteUrl );
QNetworkRequest request; QNetworkRequest request;
request.setUrl( url ); request.setUrl( url );
request.setAttribute(QNetworkRequest::RedirectPolicyAttribute,QNetworkRequest::RedirectPolicy::NoLessSafeRedirectPolicy); request.setAttribute(QNetworkRequest::RedirectPolicyAttribute,QNetworkRequest::RedirectPolicy::NoLessSafeRedirectPolicy);