Prepare name for create a page

This commit is contained in:
Peter Stuifzand 2020-06-27 16:22:04 +02:00
parent 6e400f8c17
commit 3d555226cf

View File

@ -115,7 +115,7 @@ function showSearchResultsExtended(element, template, searchTool, query, input,
}
var templateText = document.getElementById(template).innerHTML;
var rendered = Mustache.render(templateText, {page: value, results: results}, {}, ['[[', ']]']);
var rendered = Mustache.render(templateText, {page: value.trim().replace(/\s+/g, '_'), results: results}, {}, ['[[', ']]']);
let selected = $lc.find('li.selected');
if (selected) {
let selectedPos = $lc.find('li').index(selected[0])