summaryrefslogtreecommitdiff
path: root/wikipedia
diff options
context:
space:
mode:
authorRory MacQueen <rorymacqueen@gmail.com>2013-08-08 12:35:59 -0700
committerRory MacQueen <rorymacqueen@gmail.com>2013-08-08 12:35:59 -0700
commitb09ccf8994123ba4a62136bdc84d44579b4fe85d (patch)
tree6102d3bc7647842a801a3ef4c467fcff1e1dc5f3 /wikipedia
parent90e9940a3d5e3b0cf98a6f264c2382b2e85ccdfc (diff)
Fixed URL encoding and correct API call
[endlessm/eos-sdk#253]
Diffstat (limited to 'wikipedia')
-rw-r--r--wikipedia/views/wikipedia_view.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/wikipedia/views/wikipedia_view.js b/wikipedia/views/wikipedia_view.js
index f4a4500..bcd6270 100644
--- a/wikipedia/views/wikipedia_view.js
+++ b/wikipedia/views/wikipedia_view.js
@@ -5,11 +5,12 @@ const Soup = imports.gi.Soup;
const WebKit = imports.gi.WebKit2;
const Utils = imports.utils;
-const getPageURL = "http://127.0.0.1:3000/getArticleByTitle?title=";
+const getPageURL = "http://127.0.0.1:3000/getDomainSpecificArticle?title=";
// Interpret image:// URIs as wikipedia images
WebKit.WebContext.get_default().register_uri_scheme('image', function(request) {
let filename = request.get_uri().slice('image://'.length);
+ filename = decodeURI(filename);
let pictures_dir = request.get_web_view()._getArticleImagesPath();
let parent = Gio.File.new_for_path(pictures_dir);
let file = parent.get_child(filename);