boolean values of xml nodes need special treatment in IE. r=crschmidt (closes #1883)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@8779 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2009-01-29 16:01:12 +00:00
parent 88fd0519ea
commit 8f77f9e511
2 changed files with 10 additions and 2 deletions
+6 -2
View File
@@ -493,8 +493,12 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, {
if(options.attributes) {
this.setAttributes(node, options.attributes);
}
if(options.value != null) {
node.appendChild(this.createTextNode(options.value));
var value = options.value;
if(value != null) {
if(typeof value == "boolean") {
value = encodeURIComponent(value);
}
node.appendChild(this.createTextNode(value));
}
return node;
},