Deployed 6d8495b with MkDocs version: 1.3.0

This commit is contained in:
2022-04-24 05:53:57 +00:00
parent af5d1cbb55
commit 397cee1d36
6 changed files with 25 additions and 12 deletions

View File

@ -21,8 +21,15 @@ function joinUrl (base, path) {
return base + "/" + path;
}
function escapeHtml (value) {
return value.replace(/&/g, '&')
.replace(/"/g, '"')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;');
}
function formatResult (location, title, summary) {
return '<article><h3><a href="' + joinUrl(base_url, location) + '">'+ title + '</a></h3><p>' + summary +'</p></article>';
return '<article><h3><a href="' + joinUrl(base_url, location) + '">'+ escapeHtml(title) + '</a></h3><p>' + escapeHtml(summary) +'</p></article>';
}
function displayResults (results) {