mapbox / mapbox/tokml

escaping cdata?

Open
#30 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
193
Forks
91
PR merge metrics
No merged PRs in 30d

Description

Great module!

I'm converting kml which contains cdata to geojson and saving that back to kml. In the process, the cdata tags are lost, which makes the xml invalid. I resolved this issue by changing the description function to wrap the description in a cdata tag. I'd try to push it, but I'm not sure if it would goof anything up.

Anywho, thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the description function in the JavaScript conversion code and reproduce the reported GeoJSON-to-KML case with a description containing CDATA. Check how the description is emitted and verify that the resulting KML preserves the required CDATA tags without breaking other descriptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.