summaryrefslogtreecommitdiff
path: root/community/goldendict/fix-wikipedia-images.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/goldendict/fix-wikipedia-images.patch')
-rw-r--r--community/goldendict/fix-wikipedia-images.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/community/goldendict/fix-wikipedia-images.patch b/community/goldendict/fix-wikipedia-images.patch
new file mode 100644
index 000000000..ea28bcd91
--- /dev/null
+++ b/community/goldendict/fix-wikipedia-images.patch
@@ -0,0 +1,26 @@
+From 8c056589e989781c6ed5aac7491c802414489ae9 Mon Sep 17 00:00:00 2001
+From: Abs62 <ottomann@yandex.ru>
+Date: Sat, 22 Oct 2011 15:52:52 +0400
+Subject: [PATCH] Fix Wikipedia images loading
+
+---
+ mediawiki.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/mediawiki.cc b/mediawiki.cc
+index e67fdb3..9fff3dc 100644
+--- a/mediawiki.cc
++++ b/mediawiki.cc
+@@ -293,6 +293,9 @@ void MediaWikiArticleRequest::requestFinished( QNetworkReply * r )
+ // Replace the href="/foo/bar/Baz" to just href="Baz".
+ 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
+ for( ; ; )
+ {
+--
+1.8.4
+