From fe25446f8659729b7fff0b29e782552ae1044676 Mon Sep 17 00:00:00 2001 From: Manan Jethwani Date: Tue, 6 Apr 2021 20:16:09 +0530 Subject: [PATCH] added htmldecode for path --- src/server/internalServer.cpp | 1 - static/skin/taskbar.js | 1 + static/templates/suggestion.json | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/internalServer.cpp b/src/server/internalServer.cpp index 941903cac..c749ebd9f 100644 --- a/src/server/internalServer.cpp +++ b/src/server/internalServer.cpp @@ -431,7 +431,6 @@ std::unique_ptr InternalServer::handle_suggest(const RequestContext& r result.set("label", "containing '" + term + "'..."); result.set("value", term + " "); result.set("kind", "pattern"); - result.set("path", ""); result.set("first", first); results.push_back(result); } diff --git a/static/skin/taskbar.js b/static/skin/taskbar.js index 810649f05..358e1c9e6 100644 --- a/static/skin/taskbar.js +++ b/static/skin/taskbar.js @@ -17,6 +17,7 @@ function htmlDecode(input) { for(const item of ui.content) { item.label = htmlDecode(item.label); item.value = htmlDecode(item.value); + if (item.path) item.path = htmlDecode(item.path); } }, diff --git a/static/templates/suggestion.json b/static/templates/suggestion.json index 72159fa10..b16bcfb21 100644 --- a/static/templates/suggestion.json +++ b/static/templates/suggestion.json @@ -3,9 +3,9 @@ { "value" : "{{value}}", "label" : "{{label}}", - "kind" : "{{kind}}", + "kind" : "{{kind}}" {{#path}} - "path" : "{{path}}" + , "path" : "{{path}}" {{/path}} }{{/suggestions}} ]