mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
*! Process article links in wikis hosted on non-root locations correctly.
This actually makes GoldenDict work with its own Wiki ok.
This commit is contained in:
parent
4723831f5d
commit
c09a353c99
|
@ -288,7 +288,7 @@ void MediaWikiArticleRequest::requestFinished( QNetworkReply * r )
|
|||
articleString.replace( QRegExp( "<a\\shref=\"(/(\\w*/)*index.php\\?)" ),
|
||||
QString( "<a href=\"%1\\1" ).arg( wikiUrl.toString() ) );
|
||||
// Replace the href="/foo/bar/Baz" to just href="Baz".
|
||||
articleString.replace( QRegExp( "<a\\shref=\"/(\\w*/)*" ), "<a href=\"" );
|
||||
articleString.replace( QRegExp( "<a\\shref=\"/([\\w\\.]*/)*" ), "<a href=\"" );
|
||||
|
||||
// In those strings, change any underscores to spaces
|
||||
for( ; ; )
|
||||
|
|
Loading…
Reference in a new issue