commit e23fc605cfac327fe797dc9d2b83c729f9908fdc
parent 4d696c623699040ea197f26a373a85f511f1f8ae
Author: Agastya Chandrakant <acagastya@outlook.com>
Date: Sat, 8 Aug 2020 17:05:55 +0530
fixing ?
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/utils.js b/utils.js
@@ -18,8 +18,8 @@ async function fetchData(URI) {
}
function fullUrl(title) {
- title = title.replace(/\?/g, "%3F");
- let [main, anchor] = title.split("#");
+ fixedTitle = title.replace(/\?/g, "%3F");
+ let [main, anchor] = fixedTitle.split("#");
main = main.replace(/ /g, "%20");
if (anchor) anchor = anchor.replace(/ /g, "_");
let final;
@@ -30,7 +30,7 @@ function fullUrl(title) {
function getFullLink(link) {
const len = link.length;
- const trimmed = link.substr(2, len - 4).replace(/\?/g, "%3F");
+ const trimmed = link.substr(2, len - 4);
const finalUrl = fullUrl(trimmed);
return finalUrl;
}