Why does VertiGIS sanatize the html coming from my Arcade expression?
Hi, Good evening,
At the moment I am trying to create a nice looking popup to be used in a web map in VertiGIS Studio Web. I do so by writing an Arcade expression in ArcGIS Pro to query my features and add html to style them. For several attributes I have added classes to <p>-elements to later style them with CSS injected by a VertiGIS Studio Workflow in my app.
See below for part of my Arcade expression:
if($feature.IWS_GPGBEHER == '1') {
popup += `<p class="peilgebied-beheer"><span>Type beheer:</span> vast</p>
<p class="peilgebieden-vp"><span>Vast peil (VP):</span> ` + Replace(Text($feature.IWS_GPGVASTP, '#,##0.00#'), '.', ',') + ` meter ten opzichte van <abbr title="Normaal Amsterdams Peil">NAP</abbr></p>`
}But the CSS - which does work fine when I access the map with the ArcGIS Maps SDK for JavaScript - has no effect at all in the VertiGIS app.
And you know what? When I inspect the popup in the VertiGIS app, it looks like VertiGIS has “sanatized” my html! The <p>-elements are there, but the classes which I have set are gone! That's the reason why the CSS does not work…
See below (this is the wrongly ‘sanatized’ html code in VertiGIS):
WRONG
<p><span>Type beheer:</span> vast</p>
<p><span>Vast peil (VP):</span> -6,70 meter ten opzichte van <abbr title="Normaal Amsterdams Peil">NAP</abbr></p>And I really think it is VertiGIS that breaks my work, because - as said before - in my ArcGIS JavaScript app the classes appear as expected:
RIGHT
<p class="peilgebied-beheer"><span>Type beheer:</span> vast</p>
<p class="peilgebieden-vp"><span>Vast peil (VP):</span> -6,70 meter ten opzichte van <abbr title="Normaal Amsterdams Peil">NAP</abbr></p>
Why is this? And how should I work around it?
Any suggestions are more than welcome.
Cheers,
Egge-Jan
Vous devez vous connecter pour laisser un commentaire.
Commentaires
0 commentaire