diff --git a/rfc.php b/rfc.php index 4fbc58f..6daf1dc 100644 --- a/rfc.php +++ b/rfc.php @@ -9,17 +9,15 @@ $parser = new Mni\FrontYAML\Parser(null, new MDParse()); $filename = 'rfc'.$_GET["number"].'.md'; if (!file_exists($filename)) { -// header("Location: https://rfc.tildeverse.org/"); - include 'header.php'; - echo "

{$filename}

"; - include 'footer.php'; + header("Location: https://rfc.tildeverse.org/"); die(); } $document = $parser->parse(file_get_contents($filename)); $yml = $document->getYAML(); $content = $document->getContent(); $title = ($yml['title'] ?? 'invalid'); - $description = "RFC {$yml['number']}: {$yml['title']} by {htmlspecialchars($yml['author'])}"; + $author_san = htmlspecialchars($yml['author']); + $description = "RFC {$yml['number']}: {$yml['title']} by {$author_san}"; include 'header.php'; ?>

RFC :