<commit_before>'use strict';

// Start by defining the main module and adding the module dependencies
var app = angular.module(ApplicationConfiguration.applicationModuleName, ApplicationConfiguration.applicationModuleVendorDependencies);

// Setting HTML5 Location Mode
app.config(['$locationProvider', function($locationProvider) {
	$locationProvider.hashPrefix('!');
}]);

// Configure translation
app.config(['$translateProvider', function($translateProvider) {
	$translateProvider.useStaticFilesLoader({
		prefix: 'languages/',
		suffix: '.json'
	});
	$translateProvider.preferredLanguage('en_GB');
}]);
app.controller('LanguageController', ['$scope', '$translate', function($scope, $translate) {
	$scope.lang = 'en_GB';
	$scope.changeLanguage = function(lang) {
		$translate.use(lang);
	};
}]);

// Then define the function to start up the application
angular.element(document).ready(function() {
	// Fixing facebook bug with redirect
	if (window.location.hash === '#_=_') {
		window.location.hash = '#!';
	}

	// Then init the app
	angular.bootstrap(document, [ApplicationConfiguration.applicationModuleName]);
});
<commit_msg>Add sanitisation strategy for translation<commit_after>'use strict';

// Start by defining the main module and adding the module dependencies
var app = angular.module(ApplicationConfiguration.applicationModuleName, ApplicationConfiguration.applicationModuleVendorDependencies);

// Setting HTML5 Location Mode
app.config(['$locationProvider', function($locationProvider) {
	$locationProvider.hashPrefix('!');
}]);

// Configure translation
app.config(['$translateProvider', function($translateProvider) {
	$translateProvider.useSanitizeValueStrategy('sanitize');
	$translateProvider.useStaticFilesLoader({
		prefix: 'languages/',
		suffix: '.json'
	});
	$translateProvider.preferredLanguage('en_GB');
}]);
app.controller('LanguageController', ['$scope', '$translate', function($scope, $translate) {
	$scope.lang = 'en_GB';
	$scope.changeLanguage = function(lang) {
		$translate.use(lang);
	};
}]);

// Then define the function to start up the application
angular.element(document).ready(function() {
	// Fixing facebook bug with redirect
	if (window.location.hash === '#_=_') {
		window.location.hash = '#!';
	}

	// Then init the app
	angular.bootstrap(document, [ApplicationConfiguration.applicationModuleName]);
});

{'fraction_non_alphanumeric': 0.1475340136054422, 'fraction_numerical': 0.0008503401360544217, 'mean_word_length': 6.493630573248407, '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': '2843394', 'n_tokens_mistral': 648, 'n_tokens_neox': 634, 'n_words': 141}