<commit_before><?php
//=========Determine region=========
$regionurl = "";
switch(strtolower($_GET['region'])){
    case "na":
        $regionurl = "na";
        break;
    case "euw":
        $regionurl = "euw";
        break;
    case "eune":
        $regionurl = "eune";
        break;
    case "br":
        $regionurl = "br";
        break;
    case "kr":
        $regionurl = "kr";
        break;
    case "lan":
        $regionurl = "lan";
        break;
    case "las":
        $regionurl = "las";
        break;
    case "oce":
        $regionurl = "oce";
        break;
    case "ru":
        $regionurl = "ru";
        break;
    case "tr":
        $regionurl = "tr";
        break;
    default:
        $regionurl = "???";
        echo "Region not supported.";
}


//=========Core url data=========
$baseurl = "https://" . $regionurl . ".api.pvp.net/api/lol/" . $regionurl;
$summonerdataurl = "/v1.4/summoner/by-name/";
$championdataurl = "/v1.2/champion/";
$statsurl = "/v1.3/stats/by-summoner/";
$normalstatsurl = "/summary";
$rankedstatsurl = "/ranked";
$apikey = "?api_key=" . file_get_contents('./notes/key.txt');
<commit_msg>region sanitization added for custom url parameters.<commit_after><?php
//=========Determine region=========
$regionurl = "";
switch(strtolower($_GET['region'])){
    case "na":
        $regionurl = "na";
        break;
    case "euw":
        $regionurl = "euw";
        break;
    case "eune":
        $regionurl = "eune";
        break;
    case "br":
        $regionurl = "br";
        break;
    case "kr":
        $regionurl = "kr";
        break;
    case "lan":
        $regionurl = "lan";
        break;
    case "las":
        $regionurl = "las";
        break;
    case "oce":
        $regionurl = "oce";
        break;
    case "ru":
        $regionurl = "ru";
        break;
    case "tr":
        $regionurl = "tr";
        break;
    default:
        $regionurl = "???";
        echo "Region not supported.";
}

//=========Core url data=========
$baseurl = "https://" . $regionurl . ".api.pvp.net/api/lol/" . $regionurl;
$summonerdataurl = "/v1.4/summoner/by-name/";
$championdataurl = "/v1.2/champion/";
$statsurl = "/v1.3/stats/by-summoner/";
$normalstatsurl = "/summary";
$rankedstatsurl = "/ranked";
$apikey = "?api_key=" . file_get_contents('./notes/key.txt');

{'fraction_non_alphanumeric': 0.2104130808950086, 'fraction_numerical': 0.0051635111876075735, 'mean_word_length': 2.120805369127517, 'pattern_counts': {'":': 20, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3888665', 'n_tokens_mistral': 816, 'n_tokens_neox': 809, 'n_words': 170}