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());
|
$parser = new Mni\FrontYAML\Parser(null, new MDParse());
|
||||||
$filename = 'rfc'.$_GET["number"].'.md';
|
$filename = 'rfc'.$_GET["number"].'.md';
|
||||||
if (!file_exists($filename)) {
|
if (!file_exists($filename)) {
|
||||||
// header("Location: https://rfc.tildeverse.org/");
|
header("Location: https://rfc.tildeverse.org/");
|
||||||
include 'header.php';
|
|
||||||
echo "<p>{$filename}</p>";
|
|
||||||
include 'footer.php';
|
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
$document = $parser->parse(file_get_contents($filename));
|
$document = $parser->parse(file_get_contents($filename));
|
||||||
$yml = $document->getYAML();
|
$yml = $document->getYAML();
|
||||||
$content = $document->getContent();
|
$content = $document->getContent();
|
||||||
$title = ($yml['title'] ?? 'invalid');
|
$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';
|
include 'header.php';
|
||||||
?>
|
?>
|
||||||
<h1>RFC <?=$yml['number']?>: <?=$yml['title']?></h1>
|
<h1>RFC <?=$yml['number']?>: <?=$yml['title']?></h1>
|
||||||
|
|
Loading…
Reference in New Issue