Remove comments
This commit is contained in:
parent
5cf3198356
commit
0baef8a140
@ -6,6 +6,10 @@ function renderDynamicPage($page_file): array
|
||||
return require $page_file;
|
||||
}
|
||||
|
||||
function removeHtmlComments($content = '') :string {
|
||||
return preg_replace('/<!--(.|\s)*?-->/', '', $content);
|
||||
}
|
||||
|
||||
function parsePageTag($input): array
|
||||
{
|
||||
// Define the pattern for the tag
|
||||
@ -124,6 +128,8 @@ function renderPage($page_name = null, $site_name = null): array
|
||||
|
||||
$page = str_replace("__TEMPLATE_PAGE_TITLE__", $page_title, $page);
|
||||
|
||||
$page = removeHtmlComments($page);
|
||||
|
||||
return [
|
||||
"PageContent" => $page,
|
||||
"PageName" => $page_name,
|
||||
|
Loading…
Reference in New Issue
Block a user