mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
Wiki: Fix handling of url's without urls scheme
This commit is contained in:
parent
f2294ec3b6
commit
357638b033
|
@ -538,6 +538,9 @@ void MediaWikiArticleRequest::requestFinished( QNetworkReply * r )
|
||||||
#endif
|
#endif
|
||||||
QString( "<a href=\"%1/index.php?title=\\1" ).arg( url ));
|
QString( "<a href=\"%1/index.php?title=\\1" ).arg( url ));
|
||||||
|
|
||||||
|
// Add url scheme to other urls like "//xxx"
|
||||||
|
articleString.replace( " href=\"//", " href=\"" + wikiUrl.scheme() + "://" );
|
||||||
|
|
||||||
QByteArray articleBody = articleString.toUtf8();
|
QByteArray articleBody = articleString.toUtf8();
|
||||||
|
|
||||||
articleBody.prepend( dictPtr->isToLanguageRTL() ? "<div class=\"mwiki\" dir=\"rtl\">" :
|
articleBody.prepend( dictPtr->isToLanguageRTL() ? "<div class=\"mwiki\" dir=\"rtl\">" :
|
||||||
|
|
Loading…
Reference in a new issue