﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	difficulty
4508	cache_handler does not support hyphens	mikehedman		"In elgg.reload_all_translations, an ajax call is made to a url like:
cache/js/default/languages/en-gb.1234545.js

The problem is that when using a hyphenated language identifier (en-gb), the cache handler code rejects the request through the following filter:

// only alphanumeric characters plus /, ., and _ and no '..'
$filter = array(""options"" => array(""regexp"" => ""/^(\.?[_a-zA-Z0-9\/]+)+$/""));

Adding ""\-"" to the front of the filter fixes it:
$filter = array(""options"" => array(""regexp"" => ""/^(\.?[\-_a-zA-Z0-9\/]+)+$/""));

As an aside... when this filter rejects the request, it echos back a message.  But since this is being called through ajax, loading the JavaScript file fails silently...and then mysterious things start NOT working on your site. 
"	Defect	new	normal	Near Term Future Release	Core	1.8.4	minor		cache	brett@…	
