mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
Wiki: Fix handling of url's without urls scheme
This commit is contained in:
parent
f2294ec3b6
commit
357638b033
|
@ -538,8 +538,11 @@ void MediaWikiArticleRequest::requestFinished( QNetworkReply * r )
|
|||
#endif
|
||||
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();
|
||||
|
||||
|
||||
articleBody.prepend( dictPtr->isToLanguageRTL() ? "<div class=\"mwiki\" dir=\"rtl\">" :
|
||||
"<div class=\"mwiki\">" );
|
||||
articleBody.append( "</div>" );
|
||||
|
|
Loading…
Reference in a new issue