better filename when searching for encoded characters
This commit is contained in:
3
index.js
3
index.js
@@ -201,6 +201,7 @@ Searxng.prototype.handleMessage = function(event, room) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const name = toSearch;
|
||||||
toSearch = encodeURIComponent(toSearch);
|
toSearch = encodeURIComponent(toSearch);
|
||||||
|
|
||||||
const searchURL = this.searxngInstance + "/search?category_images=1&pageno=1&time_range=&format=json&"+this.searxngParameters+"&safesearch="+(messagePieces[0] == unsafeImageSearchCmd ? "0" : "1")+"&q=" + toSearch;
|
const searchURL = this.searxngInstance + "/search?category_images=1&pageno=1&time_range=&format=json&"+this.searxngParameters+"&safesearch="+(messagePieces[0] == unsafeImageSearchCmd ? "0" : "1")+"&q=" + toSearch;
|
||||||
@@ -222,7 +223,7 @@ Searxng.prototype.handleMessage = function(event, room) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sendImage(results, resultIndex, room.roomId, toSearch, event.getContent().body, 0, matrixClient, uploadMatrixClient);
|
sendImage(results, resultIndex, room.roomId, name, event.getContent().body, 0, matrixClient, uploadMatrixClient);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
matrixClient.sendNotice(room.roomId, "Error occurred during \"" + event.getContent().body + "\"");
|
matrixClient.sendNotice(room.roomId, "Error occurred during \"" + event.getContent().body + "\"");
|
||||||
|
Reference in New Issue
Block a user