forked from tildeverse/rfcs
Fix crash and remove debug view
This commit is contained in:
parent
c236caa20d
commit
7b0a6790b4
8
rfc.php
8
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 "<p>{$filename}</p>";
|
||||
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';
|
||||
?>
|
||||
<h1>RFC <?=$yml['number']?>: <?=$yml['title']?></h1>
|
||||
|
|
Loading…
Reference in New Issue