<commit_before>function drawAllPeopleDivsAtOnce(list_of_people_data) {
    var MAX_TO_DISPLAY = 100;
    var $text = $("<div>Drawing people...</div>");
    var i;
    var f;
    var div;
    var a;
    var span;
    var $results = $('<div id="results"></div>');

    $("#results").replaceWith($text);


    for (i = 0; i < list_of_people_data.length && i < MAX_TO_DISPLAY; i++) {
	f = list_of_people_data[i];
        div = $("<div />");
        a = $("<a class='person' href='http://openhatch.org/people/"+f.attributes.all_data.extra_person_info.username+"/'>" + f.attributes.name + "</a>");
        div.append(a);
        span = $("<span class='geocode'>, " + f.attributes.location + "</span>");
        div.append(span);
        $results.append(div);
    }
    if (list_of_people_data.length >= MAX_TO_DISPLAY) {
	$results.append($("<div>and " + (list_of_people_data.length - MAX_TO_DISPLAY) + " more; zoom the map to see them, or search for them specifically.</div>"));
    }

    $text.replaceWith($results);
}

function drawResults() {
    var people_to_display_now = [];
    var extent = map.getExtent();
    var i;
    var feat;
    var j;
    var f;

    for (i = 0; i < layer.features.length; i++) {
        feat = layer.features[i];
        if (extent.intersectsBounds(feat.geometry.getBounds()))  {
            for (j = 0 ; j < feat.cluster.length; j++) {
                f = feat.cluster[j];
		people_to_display_now.push(f);
	    }
	}
    }
    drawAllPeopleDivsAtOnce(people_to_display_now);
}

function handleResults(data) {
    var key;
    var features = [];
    var person;
    var feature;<commit_msg>Fix XSS in map rendering page<commit_after>function drawAllPeopleDivsAtOnce(list_of_people_data) {
    var MAX_TO_DISPLAY = 100;
    var $text = $("<div>Drawing people...</div>");
    var i;
    var f;
    var $div;
    var $a;
    var $span;
    var text;
    var $results = $('<div id="results"></div>');

    $("#results").replaceWith($text);


    for (i = 0; i < list_of_people_data.length && i < MAX_TO_DISPLAY; i++) {
        f = list_of_people_data[i];
        href = "/people/" + f.attributes.all_data.extra_person_info.username;
        $a = $("<a></a>", {class: 'person', href: href}).text(f.attributes.name);
        $span = $("<span></span>", {class: 'geocode'}).text(f.attributes.location);
        $div = $("<div></div>").append($a).append($span);
        $results.append($div);
    }
    if (list_of_people_data.length >= MAX_TO_DISPLAY) {
        text = "and " + (list_of_people_data.length - MAX_TO_DISPLAY) + " more; zoom the map to see them, or search for them specifically.";
        $div = $("<div></div>").text(text);
        $results.append($div);
    }

    $text.replaceWith($results);
}

function drawResults() {
    var people_to_display_now = [];
    var extent = map.getExtent();
    var i;
    var feat;
    var j;
    var f;

    for (i = 0; i < layer.features.length; i++) {
        feat = layer.features[i];
        if (extent.intersectsBounds(feat.geometry.getBounds()))  {
            for (j = 0 ; j < feat.cluster.length; j++) {
                f = feat.cluster[j];
		people_to_display_now.push(f);
	    }
	}
    }
    drawAllPeopleDivsAtOnce(people_to_display_now);
}

function handleResults(data) {
    var key;
    var features = [];
    var person;
    var feature;
{'fraction_non_alphanumeric': 0.17233082706766917, 'fraction_numerical': 0.0036090225563909775, 'mean_word_length': 2.749718151071026, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 28, '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': '6419220', 'n_tokens_mistral': 1171, 'n_tokens_neox': 1144, 'n_words': 238}