mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-11 23:13:24 -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;
|
return this.advancedSections;
|
||||||
},
|
},
|
||||||
getSectionId: function (sectionName) {
|
getSectionId: function (sectionName) {
|
||||||
return 'firefly_'+sectionName.replace(/\ /,'').toLowerCase();
|
return 'firefly_'+sectionName.replace(/\ /g,'').toLowerCase();
|
||||||
},
|
},
|
||||||
parseXML: function(xmlDoc) {
|
parseXML: function(xmlDoc) {
|
||||||
$A(xmlDoc.getElementsByTagName('section')).each(function (section) {
|
$A(xmlDoc.getElementsByTagName('section')).each(function (section) {
|
||||||
@ -446,11 +446,13 @@ function saveForm() {
|
|||||||
|
|
||||||
$A($('theform').getElementsByTagName('input')).each(function (input) {
|
$A($('theform').getElementsByTagName('input')).each(function (input) {
|
||||||
if (ConfigXML.getItem(input.name).multiple) {
|
if (ConfigXML.getItem(input.name).multiple) {
|
||||||
|
var value = encodeURIComponent(input.value.replace(/,/g,',,'));
|
||||||
if (multiple[input.name]) {
|
if (multiple[input.name]) {
|
||||||
multiple[input.name].push(encodeURIComponent(input.value));
|
multiple[input.name].push(value);
|
||||||
} else {
|
} else {
|
||||||
multiple[input.name] = [input.value];
|
multiple[input.name] = [value];
|
||||||
}
|
}
|
||||||
|
alert(value);
|
||||||
} else {
|
} else {
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
debug(input.id,input.value);
|
debug(input.id,input.value);
|
||||||
|
Loading…
Reference in New Issue
Block a user