Javascript split() doesn't work like PHP explode() - fixed to not lose extras

This commit is contained in:
Nathan Gray 2014-03-13 18:56:51 +00:00
parent fdef5d9484
commit a0caff3b6a

View File

@ -776,11 +776,11 @@ var et2_link_entry = et2_inputWidget.extend(
if(typeof _value == 'string' && _value.indexOf(",") > 0) _value = _value.replace(",",":");
if(typeof _value == 'string' && _value.indexOf(":") >= 0)
{
var split = et2_csvSplit(_value, 2,":");
var split = _value.split(":");
_value = {
app: split[0],
id: split[1]
app: split.shift(),
id: split
};
}
else if(_value && this.options.only_app)