Restrict imported tag values to 255 characters
authorRichard Fairhurst <richard@systemeD.net>
Mon, 3 Oct 2011 13:09:41 +0000 (14:09 +0100)
committerRichard Fairhurst <richard@systemeD.net>
Mon, 3 Oct 2011 13:09:41 +0000 (14:09 +0100)
net/systemeD/halcyon/connection/Trace.as
net/systemeD/potlatch2/utils/GpxImporter.as
net/systemeD/potlatch2/utils/KmlImporter.as
net/systemeD/potlatch2/utils/OsmImporter.as

index 8a4199ef740b1924768222a85a2cea46ea6e6a62..07eca875daa598eae0b510885a5e885b47b97fb7 100644 (file)
@@ -141,7 +141,7 @@ package net.systemeD.halcyon.connection {
             for each (var wpt:XML in file.wpt) {
                 var tags:Object = {};
                 for each (var tag:XML in wpt.children()) {
-                    tags[tag.name().localName]=tag.toString();
+                    tags[tag.name().localName]=tag.toString().substr(0,255);
                 }
                 var node:Node = connection.createNode(tags, wpt.@lat, wpt.@lon, action.push);
                                connection.registerPOI(node);
index c3d64190c4d71d60a6ef40b4226744fe5ef1a6ee..5f0816c3cec636cae75cb5b07fc1e8d02947de8a 100644 (file)
@@ -39,7 +39,7 @@ package net.systemeD.potlatch2.utils {
             for each (var wpt:XML in file.wpt) {
                                var tags:Object = {};
                                for each (var tag:XML in wpt.children()) {
-                                       tags[tag.name().localName]=tag.toString();
+                                       tags[tag.name().localName]=tag.toString().substr(0,255);
                                }
                                var node:Node = connection.createNode(tags, wpt.@lat, wpt.@lon, push);
                                connection.registerPOI(node);
index cfed83312972a42324306dd3f672f61b6b97a60e..302fa8f758bb357239d6592851a8cb8c00bbef8e 100644 (file)
@@ -32,11 +32,11 @@ package net.systemeD.potlatch2.utils {
                 var tags:Object = {};
 
                 if (placemark.name.length() > 0) {
-                    tags["name"] = placemark.name;
+                    tags["name"] = placemark.name.substr(0,255);
                 }
 
                 if (placemark.description.length() > 0) {
-                    tags["description"] = placemark.description;
+                    tags["description"] = placemark.description.substr(0,255);
                 }
 
                 for each (var point:XML in placemark.Point) {
index c3d84f2f710715fbde87421007fd0e2bdd80ea76..19b2b5128561540989c2e68d278d386bf5240dca 100644 (file)
@@ -55,7 +55,7 @@ package net.systemeD.potlatch2.utils {
         private function parseTags(tagElements:XMLList):Object {
             var tags:Object = {};
             for each (var tagEl:XML in tagElements)
-                tags[tagEl.@k] = tagEl.@v;
+                tags[tagEl.@k] = tagEl.@v.substr(0,255);
             return tags;
         }