umap icon indicating copy to clipboard operation
umap copied to clipboard

Import from kml with HTML in description

Open yohanboniface opened this issue 1 year ago • 2 comments

At this stage, when a kml file contains HTML in the description, it will be formatted by togeojson as an object : `{type: 'html', value: 'with html'.

At this point, uMap does not deal with this object at all:

  • when editing the feature, the description will be [object object]
  • when opening a popup, it will fail because greedyTemplate expects a string

I'm not sure how to deal with this, given we do not accept html in the description:

  • put anyway the html in the description, but then all the < will be visible (it is escaped)
  • keep the object, and deal with it when reading it; could work for a popup, but not when the person needs to edit it
  • what to do when kml is used as remote data (it could be user friendly to be able to show the HTML as HTML)
  • what do to with maps that have already been created from kml with html

yohanboniface avatar Dec 22 '23 10:12 yohanboniface