<?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 Re: Arcade text formatting in labels does not work when an ampersand is in the string in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1308026#M71039</link>
    <description>&lt;P&gt;I just posted &lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/labeling-automatically-escape-html-characters-when/idi-p/1308024/jump-to/first-unread-message" target="_blank" rel="noopener"&gt;this Idea&lt;/A&gt; to do those replacements behind the scenes. Go lend your support to it to hopefully solve this problem in future ArcGIS Pro versions.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jul 2023 18:25:25 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2023-07-13T18:25:25Z</dc:date>
    <item>
      <title>Arcade text formatting in labels does not work when an ampersand is in the string</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1175291#M55306</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using Arcade to format text for a label.&amp;nbsp; I noticed that&amp;nbsp; the labels do not format correctly when an ampersand is in the attribute that needs to be labeled.&amp;nbsp; For example "Aldi Inc" labels correctly. while "Quist Moving &amp;amp; Storage" does not label correctly.&lt;/P&gt;&lt;P&gt;Label String:&lt;/P&gt;&lt;P&gt;"&amp;lt;FNT name = 'Arial' style = 'Regular' size = '12'&amp;gt;" + $feature.RES_NAME + "&amp;lt;/FNT&amp;gt;"&lt;/P&gt;&lt;P&gt;Please let me know how I can label strings with an &amp;amp; in them.&lt;/P&gt;&lt;P&gt;Thank You!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 19:33:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1175291#M55306</guid>
      <dc:creator>LyonMNGIS</dc:creator>
      <dc:date>2022-05-18T19:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade text formatting in labels does not work when an ampersand is in the string</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1175433#M55318</link>
      <description>&lt;P&gt;When I just use &lt;STRONG&gt;$feature.TextField&lt;/STRONG&gt;, it works:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_0-1652937691435.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41700iA187AB804598970D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_0-1652937691435.png" alt="JohannesLindner_0-1652937691435.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use the label style tags, ArcGIS probably switches to HTML, where ampersand is a special character, so the expression breaks in these features (your code):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"&amp;lt;FNT name = 'Arial' style = 'Regular' size = '12'&amp;gt;" + $feature.TextField + "&amp;lt;/FNT&amp;gt;"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_1-1652937803048.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41701i3E5F17A6446A366E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_1-1652937803048.png" alt="JohannesLindner_1-1652937803048.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to escape the ampersand as an HTML entity:&lt;BR /&gt;"&amp;lt;FNT name = 'Arial' style = 'Regular' size = '12'&amp;gt;" + &lt;STRONG&gt;Replace($feature.TextField, "&amp;amp;", "&amp;amp;amp;")&lt;/STRONG&gt; + "&amp;lt;/FNT&amp;gt;"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_2-1652938027261.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41702i40693FDA2B9E8030/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_2-1652938027261.png" alt="JohannesLindner_2-1652938027261.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 05:27:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1175433#M55318</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-05-19T05:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade text formatting in labels does not work when an ampersand is in the string</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1175528#M55333</link>
      <description>&lt;P&gt;The problem is the formatting you have.&lt;/P&gt;&lt;P&gt;Is there a reason why you use coded formatting and not simply specify font and size in the label properties?&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 13:26:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1175528#M55333</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2022-05-19T13:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade text formatting in labels does not work when an ampersand is in the string</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1308011#M71035</link>
      <description>&lt;P&gt;I'm having the same issue with &amp;lt;. I would like to show the GW elevation as &amp;lt;766.44 ft.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 18:00:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1308011#M71035</guid>
      <dc:creator>JackiBergman</dc:creator>
      <dc:date>2023-07-13T18:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade text formatting in labels does not work when an ampersand is in the string</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1308019#M71037</link>
      <description>&lt;P&gt;The HTML entity for "&amp;lt;" is "&amp;amp;lt;"&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"&amp;lt;CLR red='255'&amp;gt;" + $feature.Bla + TextFormatting.NewLine + Replace($feature.Bla, "&amp;lt;", "&amp;amp;lt;") + "&amp;lt;/CLR&amp;gt;"&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 13 Jul 2023 18:10:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1308019#M71037</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-07-13T18:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade text formatting in labels does not work when an ampersand is in the string</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1308026#M71039</link>
      <description>&lt;P&gt;I just posted &lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/labeling-automatically-escape-html-characters-when/idi-p/1308024/jump-to/first-unread-message" target="_blank" rel="noopener"&gt;this Idea&lt;/A&gt; to do those replacements behind the scenes. Go lend your support to it to hopefully solve this problem in future ArcGIS Pro versions.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 18:25:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1308026#M71039</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-07-13T18:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade text formatting in labels does not work when an ampersand is in the string</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1561104#M90401</link>
      <description>&lt;P&gt;I'm guessing the answer is no but it'd be great if regular HTML and CSS worked with Arcade so labels could mix and match color and italics etc to text. Kind of like how you inline format text in text boxes in ArcMap and Pro. Also would be great if popups supported full HTML/CSS.&amp;nbsp; (instead the measly 10 tags or so, and perhaps MOST importantly, how they don't support the &amp;lt;title&amp;gt; tooltip tag, I have been begging for for 15 years)&amp;nbsp; &amp;nbsp;Basically it'd be great if standard HTML was supported across the platform (Pro, Map Viewer, Popups, Smart Forms in Survey123/Field Maps, etc)&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 03:25:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1561104#M90401</guid>
      <dc:creator>Kevin_MacLeod</dc:creator>
      <dc:date>2024-11-21T03:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade text formatting in labels does not work when an ampersand is in the string</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1615657#M95841</link>
      <description>&lt;P&gt;Thanks for this solution. This came up with taxlot data with owners where the "&amp;amp;" broke the formatting.&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 20:17:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-text-formatting-in-labels-does-not-work/m-p/1615657#M95841</guid>
      <dc:creator>La_Olivia</dc:creator>
      <dc:date>2025-05-16T20:17:56Z</dc:date>
    </item>
  </channel>
</rss>

