<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Excessive HTML sanitisation preventing using SVGs in Popups in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/excessive-html-sanitisation-preventing-using-svgs/m-p/1537674#M61459</link>
    <description>&lt;P&gt;I am trying to create a popup to provide information about assets, but I am facing significant limitations with SVGs and the CSS available on the ArcGIS platform inside of popups.&lt;/P&gt;&lt;P&gt;I understand that ArcGIS performs internal HTML sanitization (e.g. via &lt;A href="https://github.com/Esri/arcgis-html-sanitizer" target="_self"&gt;@esri/arcgis-html-sanitize)&amp;nbsp;&lt;/A&gt;to protect against XSS attacks, but I am surprised by the extent of these restrictions. For example, it is currently not possible to:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Specify SVG fill colors.&lt;/LI&gt;&lt;LI&gt;Apply simple transformations, such as rotations, to elements using a transformation style property.&lt;/LI&gt;&lt;LI&gt;Use many types of SVG elements. For instance, circles and other elements are stripped of all their attributes and are rendered useless.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I created a simple popup design in Figma that requires an SVG rotated to the correct orientation based on a heading attribute from a feature. To achieve this simple requirement, I have found it impossible to use an SVG. Instead, I am forced to use an image hosted by a provider like Cloudinary, which allows for server-side rotation of the image via a property in the url&amp;nbsp; (&lt;A href="https://cloudinary.com/guides/image-effects/rotating-an-image-with-css#:~:text=Rotating%20Images%20with%20Cloudinary%E2%80%99s%20Image%20API" target="_self"&gt;details here&lt;/A&gt;)&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a simpler way to achieve this effect? Does the XSS sanitation need to be so severe as to render the use of core html syntax unusable?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanDawe_BAS_0-1726134757460.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/114874i17E4BC835C41CB66/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanDawe_BAS_0-1726134757460.png" alt="JonathanDawe_BAS_0-1726134757460.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Sep 2024 10:05:49 GMT</pubDate>
    <dc:creator>JonathanDawe3</dc:creator>
    <dc:date>2024-09-12T10:05:49Z</dc:date>
    <item>
      <title>Excessive HTML sanitisation preventing using SVGs in Popups</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/excessive-html-sanitisation-preventing-using-svgs/m-p/1537674#M61459</link>
      <description>&lt;P&gt;I am trying to create a popup to provide information about assets, but I am facing significant limitations with SVGs and the CSS available on the ArcGIS platform inside of popups.&lt;/P&gt;&lt;P&gt;I understand that ArcGIS performs internal HTML sanitization (e.g. via &lt;A href="https://github.com/Esri/arcgis-html-sanitizer" target="_self"&gt;@esri/arcgis-html-sanitize)&amp;nbsp;&lt;/A&gt;to protect against XSS attacks, but I am surprised by the extent of these restrictions. For example, it is currently not possible to:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Specify SVG fill colors.&lt;/LI&gt;&lt;LI&gt;Apply simple transformations, such as rotations, to elements using a transformation style property.&lt;/LI&gt;&lt;LI&gt;Use many types of SVG elements. For instance, circles and other elements are stripped of all their attributes and are rendered useless.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I created a simple popup design in Figma that requires an SVG rotated to the correct orientation based on a heading attribute from a feature. To achieve this simple requirement, I have found it impossible to use an SVG. Instead, I am forced to use an image hosted by a provider like Cloudinary, which allows for server-side rotation of the image via a property in the url&amp;nbsp; (&lt;A href="https://cloudinary.com/guides/image-effects/rotating-an-image-with-css#:~:text=Rotating%20Images%20with%20Cloudinary%E2%80%99s%20Image%20API" target="_self"&gt;details here&lt;/A&gt;)&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a simpler way to achieve this effect? Does the XSS sanitation need to be so severe as to render the use of core html syntax unusable?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanDawe_BAS_0-1726134757460.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/114874i17E4BC835C41CB66/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanDawe_BAS_0-1726134757460.png" alt="JonathanDawe_BAS_0-1726134757460.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 10:05:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/excessive-html-sanitisation-preventing-using-svgs/m-p/1537674#M61459</guid>
      <dc:creator>JonathanDawe3</dc:creator>
      <dc:date>2024-09-12T10:05:49Z</dc:date>
    </item>
  </channel>
</rss>

