Fix a localization problem with the XML format's createTextNode method in IE, p=fvanderbiest,me r=fredj (closes #2782)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10676 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2010-08-23 08:51:46 +00:00
parent 7832d8dda1
commit 19af3bb8e7
2 changed files with 34 additions and 10 deletions

View File

@@ -243,6 +243,9 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, {
*/
createTextNode: function(text) {
var node;
if (typeof text !== "string") {
text = String(text);
}
if(this.xmldom) {
node = this.xmldom.createTextNode(text);
} else {
@@ -568,9 +571,6 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, {
}
var value = options.value;
if(value != null) {
if(typeof value == "boolean") {
value = String(value);
}
node.appendChild(this.createTextNode(value));
}
return node;