mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-24 06:05:56 -05:00
Fixed ticket #131 and fixed values sometimes not URI escaped
plus found a regexp without the global "g" flag
This commit is contained in:
parent
8589376291
commit
40ebd3e7c8
@ -37,7 +37,7 @@ var ConfigXML = {
|
||||
return this.advancedSections;
|
||||
},
|
||||
getSectionId: function (sectionName) {
|
||||
return 'firefly_'+sectionName.replace(/\ /,'').toLowerCase();
|
||||
return 'firefly_'+sectionName.replace(/\ /g,'').toLowerCase();
|
||||
},
|
||||
parseXML: function(xmlDoc) {
|
||||
$A(xmlDoc.getElementsByTagName('section')).each(function (section) {
|
||||
@ -446,11 +446,13 @@ function saveForm() {
|
||||
|
||||
$A($('theform').getElementsByTagName('input')).each(function (input) {
|
||||
if (ConfigXML.getItem(input.name).multiple) {
|
||||
var value = encodeURIComponent(input.value.replace(/,/g,',,'));
|
||||
if (multiple[input.name]) {
|
||||
multiple[input.name].push(encodeURIComponent(input.value));
|
||||
multiple[input.name].push(value);
|
||||
} else {
|
||||
multiple[input.name] = [input.value];
|
||||
multiple[input.name] = [value];
|
||||
}
|
||||
alert(value);
|
||||
} else {
|
||||
if (DEBUG) {
|
||||
debug(input.id,input.value);
|
||||
|
Loading…
Reference in New Issue
Block a user