<commit_before>$(function() {
    $('#applicant_server_id').change(populateArmory);
    $('#applicant_character_name').change(populateArmory);
});

function populateArmory() {
    cserver = $('#applicant_server_id :selected').text().replace(/[^A-Za-z0-9]/, '').toLowerCase();
    cname   = $('#applicant_character_name').val().toLowerCase();

    $('#applicant_armory_link').val("http://us.battle.net/wow/en/character/" + cserver + "/" + cname + "/advanced");<commit_msg>Fix URL for servers with spaces in their name<commit_after>$(function() {
    $('#applicant_server_id').change(populateArmory);
    $('#applicant_character_name').change(populateArmory);
});

function populateArmory() {
    cserver = $('#applicant_server_id :selected').text().replace(/\s/, '-').replace(/[^A-Za-z0-9\-]/, '').toLowerCase();
    cname   = $('#applicant_character_name').val().toLowerCase();

    $('#applicant_armory_link').val("http://us.battle.net/wow/en/character/" + cserver + "/" + cname + "/advanced");
{'fraction_non_alphanumeric': 0.22914572864321608, 'fraction_numerical': 0.004020100502512563, 'mean_word_length': 5.264150943396227, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7466230', 'n_tokens_mistral': 337, 'n_tokens_neox': 330, 'n_words': 38}