diff --git a/lib/page.php b/lib/page.php index f016ce3..a25e615 100644 --- a/lib/page.php +++ b/lib/page.php @@ -6,6 +6,10 @@ function renderDynamicPage($page_file): array return require $page_file; } +function removeHtmlComments($content = '') :string { + return preg_replace('//', '', $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,