Add underscore to language query string regex.

This commit is contained in:
Blake Grotewold
2014-11-21 12:04:01 -05:00
parent 1dafbae5eb
commit e7bd841d39
+2 -2
View File
@@ -669,8 +669,8 @@
switchLanguage: function(dom){
var lang = $(dom).data("language");
if(document.location.href.search(/[\?\&]lang=[a-z]+/) != -1){
document.location.href = document.location.href.replace( /([\?\&]lang=)([a-z]+)/gi , "$1"+lang );
if(document.location.href.search(/[\?\&]lang=[a-z_]+/) != -1){
document.location.href = document.location.href.replace( /([\?\&]lang=)([a-z_]+)/gi , "$1"+lang );
}else{
document.location.href = document.location.href + ( (document.location.href.search(/\?/) != -1 )?"&":"?") + "lang="+lang;
}