Exception/bug to be handled when exporting KMZ

Hi,

When a mask is created via Mask manager > create a new mask based on a value range, the logical expression is automatically copied to the “description” attribute of the created mask. Naturally, this expression has the character “<” in it. When this mask is used in a layer, depending on the order of the masks/bands used, this “description” becomes the “dominant description” of the layer. When the layer is exported as KMZ, “description” is directly copied to the “description” tag of the XML file inside KMZ, including the character “<”. The export does not raise any error or warning. But the KMZ can not be opened in Google Earth and it raises parsing error, because it looks like “<” is interpreted as opening a tag in the markup.

The issue is in SNAP 5.0 amd64 linux version. I have heard there is no such problem in Windows version.

The problem is easy to handle, by either editing the XML file in KMZ file or just editing “description” attribute before exporting KMZ, but I think it should be handled in the development also.

Cheers

Thanks for this reported.
We need to escape this character in the xml file. So that it is not considered as start of an xml tag.
Actually all the following characters need to be escaped:

"   --> &quot; 
'   --> &apos; 
<   --> &lt; 
>   --> &gt; 
&   --> &amp;

[SNAP-691] Text needs to be escaped in KMZ export