<commit_before>o_.capitaliseFirstLetter = function(string){
    return string.charAt(0).toUpperCase() + string.slice(1);
};

o_.lowerFirstLetter = function(string){
    if(!string) return;
    return string.charAt(0).toLowerCase() + string.slice(1);
};

o_.sanitizeObject = function(object){
    if(Meteor.isServer){
        var sanitizedObject = {};
        _.each(_.pairs(object), function(lonelyArray){
            sanitizedObject[lonelyArray[0]] = sanitizeHtml(lonelyArray[1], {allowedTags: [], allowedAttributes: {}});
        });

        return sanitizedObject
    }
};

o_.sanitizeArray = function(array){
    if(Meteor.isServer){
        var sanitizedArray = [];
        _.each(array, function(string){
            sanitizedArray.push(sanitizeHtml(string, {allowedTags: [], allowedAttributes: {}}));
        });

        return sanitizedArray;
    }
};

o_.sanitizeString = function(string){<commit_msg>Allow <a>-tags for policyAreas.summary and policies.summary<commit_after>o_.capitaliseFirstLetter = function(string){
    return string.charAt(0).toUpperCase() + string.slice(1);
};

o_.lowerFirstLetter = function(string){
    if(!string) return;
    return string.charAt(0).toLowerCase() + string.slice(1);
};

o_.sanitizeObject = function(object){
    if(Meteor.isServer){
        var sanitizedObject = {};
        _.each(_.pairs(object), function(lonelyArray){
            if(sanitizedObject[0] === "summary"){
                sanitizedObject[lonelyArray[0]] = sanitizeHtml(lonelyArray[1],
                    {allowedTags: ["a"], allowedAttributes: {"a": ["href"]}});
            } else {
                sanitizedObject[lonelyArray[0]] = sanitizeHtml(lonelyArray[1], {allowedTags: [], allowedAttributes: {}});
            }
        });

        return sanitizedObject
    }
};

o_.sanitizeArray = function(array){
    if(Meteor.isServer){
        var sanitizedArray = [];
        _.each(array, function(string){
            sanitizedArray.push(sanitizeHtml(string, {allowedTags: [], allowedAttributes: {}}));
        });

        return sanitizedArray;
    }
};

o_.sanitizeString = function(string){
{'fraction_non_alphanumeric': 0.15257439773264053, 'fraction_numerical': 0.007085498346717053, 'mean_word_length': 3.2191235059760954, 'pattern_counts': {'":': 1, '<': 4, '<?xml version=': 0, '>': 4, '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': '567253', 'n_tokens_mistral': 655, 'n_tokens_neox': 639, 'n_words': 92}