From 12463da014261f4465e0a81dd97e51658b8be06b Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 30 Jan 2017 09:06:44 +0900 Subject: [PATCH] Fix bug (1.4.1) --- package.json | 2 +- src/plugins/wikipedia.ts | 2 +- tslint.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 3f0b78d..3a433a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "summaly", - "version": "1.4.0", + "version": "1.4.1", "description": "Get web page's summary", "author": "syuilo ", "license": "MIT", diff --git a/src/plugins/wikipedia.ts b/src/plugins/wikipedia.ts index 9a3aa8c..0b76e53 100644 --- a/src/plugins/wikipedia.ts +++ b/src/plugins/wikipedia.ts @@ -10,7 +10,7 @@ exports.test = (url: URL.Url) => exports.summary = (url: URL.Url) => new Promise((res, rej) => { const lang = url.host.split('.')[0]; const title = url.pathname.split('/')[2]; - const endpoint = `https://${lang}.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro=&explaintext=&titles=${title}`; + const endpoint = `https://${lang}.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro=&explaintext=&titles=${encodeURIComponent(title)}`; log(`lang is ${lang}`); log(`title is ${title}`); diff --git a/tslint.json b/tslint.json index e7c21c3..2089dbe 100644 --- a/tslint.json +++ b/tslint.json @@ -17,7 +17,7 @@ "jsdoc-format": true, "label-position": true, "label-undefined": true, - "max-line-length": [true, 140], + "max-line-length": false, "member-access": false, "member-ordering": [true, "static-before-instance",