<commit_before><?php
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');

include '../src/autoloader.php';

function get($name, $default = '')
{
    if (!isset($_GET[$name])) {
        return $default;
    }

    if ($name === 'url') {
        if (!filter_var($_GET['url'], FILTER_VALIDATE_URL)) {
            return 'http://doNotTryToXSS.invalid';
        }

        return urldecode($_GET['url']);
    }

    return $_GET[$name];
}

function getEscaped($name, $default = '')
{
    return htmlspecialchars(get($name, $default), ENT_QUOTES, 'UTF-8');
}

function printAny($text)
{
    if (is_array($text)) {<commit_msg>trying to fix encoded urls<commit_after><?php
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');

include '../src/autoloader.php';

function get($name, $default = '')
{
    if (!isset($_GET[$name])) {
        return $default;
    }

    if ($name === 'url') {
        $url = urldecode($_GET['url']);

        if (!filter_var($url, FILTER_VALIDATE_URL)) {
            return 'http://doNotTryToXSS.invalid';
        }

        return $url;
    }

    return $_GET[$name];
}

function getEscaped($name, $default = '')
{
    return htmlspecialchars(get($name, $default), ENT_QUOTES, 'UTF-8');
}

function printAny($text)
{
    if (is_array($text)) {
{'fraction_non_alphanumeric': 0.19616858237547893, 'fraction_numerical': 0.004597701149425287, 'mean_word_length': 3.338870431893688, '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': '2703567', 'n_tokens_mistral': 464, 'n_tokens_neox': 454, 'n_words': 82}