Closed ghost closed 7 years ago
Hi Robertico !
This part parses the XML into nodes and gives it to togeojson
:
https://github.com/makinacorpus/Leaflet.FileLayer/blob/gh-pages/leaflet.filelayer.js#L80-L82
If the problem was fixed in togeojson, we might pass the raw XML instead of parsing it here...
Could you try to change this and see if it helps ?
Thanks for reporting!
Hi,
I'm not sure I understand you correctly. Do I need to comment out these lines? When I do so, it doesn't work at all.
Sorry, I'm not a professional programmer :-)
Well, I upgraded togeojson towards 0.8.1, and it works wel, it strips out CDATA out of texts !
I doubted my findings, but... this doesn't work.
<description>
<![CDATA[
Here is some text
]]>
</description>
but this does !
<description><![CDATA[Here is some text]]></description>
So it must be a single line without line breaks. As far as I know they're both valid. Nevertheless a bug?
In the example I tried it worked. But this way :
<description><![CDATA[
Here is some text
]]></description>
Otherwise, it would be a bug in togeojson...
Thanks. Created a new issue on togeojson for this.
I close this issue. If someone has still problems with it please reopen !
When I load a KML file the KML description is ignored when it's inside a CDATA section.
This works just fine,
but not this one;
It seems an old issue in togeojson.js and should be fixed https://github.com/mapbox/togeojson/issues/42 Using the latest togeojson.js file doesn't solved my problem.
Is this a leaflet.filelayer issue or togeojson.js ?
Regards,
Robertico