When defining the 'content' property of a PopupTemplate in ArcGIS API for JavaScript 4.23 using HTML tags, the values of certain properties are missing when the popup elements are inspected in the developer tools.
上次发布: April 15, 2022ArcGIS API for JavaScript
漏洞 ID 编号
BUG-000148351
已提交
April 7, 2022
上次修改时间
June 5, 2024
适用范围
ArcGIS API for JavaScript
找到的版本
4.23
操作系统
Windows OS
操作系统版本
10.0 64 Bit
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
This occurs due to the HTML sanitizer sanitizing and escaping strings, according to the ArcGIS Online supported HTML specification: https://doc.arcgis.com/en/arcgis-online/reference/supported-html.htm.
Formatting the HTML content within a function to set the PopupTemplate content fixes the problem. See the following code sample: https://codepen.io/laurenb14/pen/wvpELgw?editors=1000.
Refer to this blog for more details on the HTML sanitizer: https://www.esri.com/arcgis-blog/products/js-api-arcgis/mapping/using-html-with-popups-in-the-arcgis-api-for-javascript/.