aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-05-06 05:44:08 -0400
committertdro <tdro@noreply.example.com>2022-05-06 05:44:08 -0400
commit483e4a9cb8030571697bb1790560e2d1dd6d5c10 (patch)
treee9e1af4ff218c970836fa76bf9c2fea886e79b42 /static
parent207151902ce5ac72c716273291a6de391a557b7e (diff)
downloadcanory-483e4a9cb8030571697bb1790560e2d1dd6d5c10.tar.gz
canory-483e4a9cb8030571697bb1790560e2d1dd6d5c10.tar.bz2
canory-483e4a9cb8030571697bb1790560e2d1dd6d5c10.zip
themes/default/layouts: Remove garbled entities
Diffstat (limited to 'static')
-rw-r--r--static/js/fixedsearch.ts7
-rw-r--r--static/js/index.js6
2 files changed, 4 insertions, 9 deletions
diff --git a/static/js/fixedsearch.ts b/static/js/fixedsearch.ts
index 3788cb3..2b0abda 100644
--- a/static/js/fixedsearch.ts
+++ b/static/js/fixedsearch.ts
@@ -170,17 +170,14 @@
} else {
dropdown.removeAttribute("hidden");
for (const string in results.slice(0, 10)) {
- const decode = document.createElement("textarea");
- decode.innerHTML = results[string].obj.title;
-
let highlight = fuzzysort.highlight(
- fuzzysort.single(term, decode.value),
+ fuzzysort.single(term, results[string].obj.title),
"<span>",
"</span>",
);
if (highlight === null) {
- highlight = decode.value;
+ highlight = results[string].obj.title;
}
items = items +
diff --git a/static/js/index.js b/static/js/index.js
index 7fc5785..62615e5 100644
--- a/static/js/index.js
+++ b/static/js/index.js
@@ -408,11 +408,9 @@
} else {
dropdown.removeAttribute("hidden");
for(const string in results.slice(0, 10)){
- const decode = document.createElement("textarea");
- decode.innerHTML = results[string].obj.title;
- let highlight = fuzzysort.highlight(fuzzysort.single(term, decode.value), "<span>", "</span>");
+ let highlight = fuzzysort.highlight(fuzzysort.single(term, results[string].obj.title), "<span>", "</span>");
if (highlight === null) {
- highlight = decode.value;
+ highlight = results[string].obj.title;
}
items = items + `
<li>