<commit_before><?php

// Include the class and simple configuration file
include_once 'markdown.php';
include_once 'config/config.php';

$requested_post = htmlspecialchars(trim(stripslashes($_GET['name'])));
$posts_url = POSTS_DIR . DIRECTORY_SEPARATOR . $requested_post . '.md';

if (file_exists($posts_url) && preg_match('/[^a-z_\-0-9]/i', $posts_url))
{
    $output = Markdown(file_get_contents(POSTS_DIR . DIRECTORY_SEPARATOR . $requested_post . '.md'));
    
    include_once 'layouts/header.html';
    echo $output;
    include_once 'layouts/footer.html';
}
else
{
    /**
     * This is about as simple as it gets. I would be recommending
     * that you change this to a redirect, throw an error, or do<commit_msg>Moved long concatenated string to a re-usable variable<commit_after><?php

// Include the class and simple configuration file
include_once 'markdown.php';
include_once 'config/config.php';

$requested_post = htmlspecialchars(trim(stripslashes($_GET['name'])));
$posts_url = POSTS_DIR . DIRECTORY_SEPARATOR . $requested_post . '.md';

if (file_exists($posts_url) && preg_match('/[^a-z_\-0-9]/i', $posts_url))
{
    $output = Markdown(file_get_contents($posts_url));
    
    include_once 'layouts/header.html';
    echo $output;
    include_once 'layouts/footer.html';
}
else
{
    /**
     * This is about as simple as it gets. I would be recommending
     * that you change this to a redirect, throw an error, or do
{'fraction_non_alphanumeric': 0.13421418636995827, 'fraction_numerical': 0.0027816411682892906, 'mean_word_length': 4.2327272727272724, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1248078', 'n_tokens_mistral': 484, 'n_tokens_neox': 470, 'n_words': 121}