Merge pull request #153 from xiaoyifang/merge/0922

ignored:
Full-text search: Use separate thread pool for search requests
Full-text search: Reduce max thread count
This commit is contained in:
xiaoyifang 2022-09-22 20:16:24 +08:00 committed by GitHub
commit c1e85db74f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3459,7 +3459,7 @@ static void filterAndCollectResources( QString & html, QRegExp & rx, const QStri
{
QUrl url( rx.cap( 1 ) );
QString host = url.host();
QString resourcePath = QString::fromLatin1( QUrl::toPercentEncoding( Utils::Url::path( url ), "/" ) );
QString resourcePath = Utils::Url::path( url );
if ( !host.startsWith( '/' ) )
host.insert( 0, '/' );
@ -3476,6 +3476,7 @@ static void filterAndCollectResources( QString & html, QRegExp & rx, const QStri
}
// Modify original url, set to the native one
resourcePath = QString::fromLatin1( QUrl::toPercentEncoding( resourcePath, "/" ) );
QString newUrl = sep + QDir( folder ).dirName() + host + resourcePath + sep;
html.replace( pos, rx.cap().length(), newUrl );
pos += newUrl.length();