1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-12-22 13:45:02 +00:00

Escape html in search result previews

This commit is contained in:
Starbeamrainbowlabs 2017-08-26 12:40:33 +01:00
parent ca5b16727e
commit 179c4b500d
3 changed files with 3 additions and 3 deletions

View file

@ -3326,7 +3326,7 @@ register_module([
if(strlen($context) === 0)
$context = substr($pagesource, 0, $settings->search_characters_context * 2);
//echo("'Generated search context for " . $result["pagename"] . ": $context'\n");
$context = search::highlight_context($_GET["query"], $context);
$context = search::highlight_context($_GET["query"], htmlentities($context));
/*if(strlen($context) == 0)
{
$context = search::strip_markup(file_get_contents("$env->page.md", null, null, null, $settings->search_characters_context * 2));

View file

@ -104,7 +104,7 @@
"author": "Starbeamrainbowlabs",
"description": "Adds proper search functionality to Pepperminty Wiki using an inverted index to provide a full text search engine. If pages don't show up, then you might have hit a stop word. If not, try requesting the `invindex-rebuild` action to rebuild the inverted index from scratch.",
"id": "feature-search",
"lastupdate": 1501321430,
"lastupdate": 1503747477,
"optional": false
},
{

View file

@ -176,7 +176,7 @@ register_module([
if(strlen($context) === 0)
$context = substr($pagesource, 0, $settings->search_characters_context * 2);
//echo("'Generated search context for " . $result["pagename"] . ": $context'\n");
$context = search::highlight_context($_GET["query"], $context);
$context = search::highlight_context($_GET["query"], htmlentities($context));
/*if(strlen($context) == 0)
{
$context = search::strip_markup(file_get_contents("$env->page.md", null, null, null, $settings->search_characters_context * 2));