Fix Wikipedia images loading

This commit is contained in:
Abs62 2011-10-22 15:52:52 +04:00
parent 34377a128a
commit 8c056589e9

View file

@ -293,6 +293,9 @@ void MediaWikiArticleRequest::requestFinished( QNetworkReply * r )
// Replace the href="/foo/bar/Baz" to just href="Baz". // 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=\"" );
// Add "http:" to image source urls
articleString.replace( " src=\"//", " src=\"http://" );
// In those strings, change any underscores to spaces // In those strings, change any underscores to spaces
for( ; ; ) for( ; ; )
{ {