<?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: JavaScript API 3.11 Adding label adds html tag in data in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335083#M30961</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Working with this sample: &lt;A href="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=popup_chart" title="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=popup_chart"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;‌ , I do not encounter the problem you are describing. I added the following lines of code to the application:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.on("click" ,function(evt) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(map.infoWindow.features[0].attributes);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;The attributes are displayed with name value pairs without any HTML formatting. Is there anything I am doing wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Dec 2014 18:24:31 GMT</pubDate>
    <dc:creator>NicholasHaney</dc:creator>
    <dc:date>2014-12-17T18:24:31Z</dc:date>
    <item>
      <title>JavaScript API 3.11 Adding label adds html tag in data</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335082#M30960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I add a label to a chart with the following: &lt;/P&gt;&lt;P&gt;fieldInfos: [{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldName: "hosp_beds",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label: "Total Beds"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldName: "icu_beds",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label: "ICU Beds"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data element passed has the following values.&lt;/P&gt;&lt;P&gt;hosp_beds: "&amp;lt;span class='esriNumericValue'&amp;gt;32&amp;lt;/span&amp;gt;"&lt;/P&gt;&lt;P&gt;icu_beds: "&amp;lt;span class='esriNumericValue'&amp;gt;3&amp;lt;/span&amp;gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is fine for just labels but I process the data elements and I expect a number only and not html tags.&amp;nbsp; This didn't happen prior to 3.10.&amp;nbsp; Any idea if this is a bug or a change?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2014 01:50:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335082#M30960</guid>
      <dc:creator>DanRicketts</dc:creator>
      <dc:date>2014-11-14T01:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript API 3.11 Adding label adds html tag in data</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335083#M30961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Working with this sample: &lt;A href="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=popup_chart" title="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=popup_chart"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;‌ , I do not encounter the problem you are describing. I added the following lines of code to the application:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.on("click" ,function(evt) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(map.infoWindow.features[0].attributes);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;The attributes are displayed with name value pairs without any HTML formatting. Is there anything I am doing wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 18:24:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335083#M30961</guid>
      <dc:creator>NicholasHaney</dc:creator>
      <dc:date>2014-12-17T18:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript API 3.11 Adding label adds html tag in data</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335084#M30962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nicholas,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&amp;nbsp; Yes.&amp;nbsp; I get the same results in my example.&amp;nbsp; In the original layer data there is no formatting markup.&amp;nbsp; However, for some reason when you pass the value to a javascript function within the popup the formatting is there for anything you have a label for.&amp;nbsp; I have this for the description:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #a31515; font-size: 10pt; font-family: Consolas;"&gt;"Address: {hosp_street} &amp;lt;br/&amp;gt; ICU/Total Beds: {ICUCOMP:icucomp}"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #a31515; font-size: 10pt; font-family: Consolas;"&gt;The markup is passed to my icucomp function on anything I have a label specified for in my chart.&amp;nbsp; Here is my icucomp function:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;function icucomp(value, key, data) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #a31515; font-size: 10pt; font-family: Consolas;"&gt;console.log("icucomp "&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;, data)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; (data.icu_beds / data.hosp_beds).toFixed(3);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;If I go back to ArcGIS javascript version 3.8 it doesn't include the formatting.&amp;nbsp; However when I paste my code using my service into the sandbox it works fine.&amp;nbsp; I am at a loss now since I just copy and pasted and it is working as expected in the sandbox.&amp;nbsp; Any ideas on what could cause the difference?&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 19:33:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335084#M30962</guid>
      <dc:creator>DanRicketts</dc:creator>
      <dc:date>2015-01-05T19:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript API 3.11 Adding label adds html tag in data</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335085#M30963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if this is the difference but the Sandbox is using version 3.12.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 19:39:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335085#M30963</guid>
      <dc:creator>NicholasHaney</dc:creator>
      <dc:date>2015-01-05T19:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript API 3.11 Adding label adds html tag in data</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335086#M30964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I saw that and updated my to 3.12 and hoped that would resolve but still no luck.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 19:43:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335086#M30964</guid>
      <dc:creator>DanRicketts</dc:creator>
      <dc:date>2015-01-05T19:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript API 3.11 Adding label adds html tag in data</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335087#M30965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would it be possible to post your code to JSFiddle or zip it up and post it here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 19:58:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335087#M30965</guid>
      <dc:creator>NicholasHaney</dc:creator>
      <dc:date>2015-01-05T19:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript API 3.11 Adding label adds html tag in data</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335088#M30966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is strange.&amp;nbsp; When I run the attached test on my machine it does the same thing as mine, it puts the formatting inline.&amp;nbsp; If I run it in the sandbox it works fine.&amp;nbsp; I ran it on three different web servers locally, apache, iisexpress, and IIS all give the the same result of putting the formatting inline.&amp;nbsp; When I change back to 3.8 it works fine.&amp;nbsp; I put a calculation in the sample.&amp;nbsp; The calculation produces NaN on my webservers and the correct result in the sandbox.&amp;nbsp; What happens if you run this file locally?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 21:36:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335088#M30966</guid>
      <dc:creator>DanRicketts</dc:creator>
      <dc:date>2015-01-05T21:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript API 3.11 Adding label adds html tag in data</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335089#M30967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I spent some time testing this yesterday. Your code produces NaN on my local server and in the sandbox. I don't know if this is expected behavior or not. I did produce a workaround for this issue though. The following is the calcit function I use in my application (note that it uses jQuery):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function calcit(value, key, data) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var number_Fin = $.parseHTML( data.Number_Fin );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var number_Sta = $.parseHTML( data.Number_Sta );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (number_Fin[0].innerHTML / number_Sta[0].innerHTML).toFixed(3);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 13:22:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335089#M30967</guid>
      <dc:creator>NicholasHaney</dc:creator>
      <dc:date>2015-01-06T13:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript API 3.11 Adding label adds html tag in data</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335090#M30968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes.&amp;nbsp; NaN is what is expected when the html tags are returned for the formatted values.&amp;nbsp; So is this a bug since 3.8?&amp;nbsp; Do you know what changed then to make the labels return tags?&amp;nbsp; I am using a regex to get rid of the html tags so I can work around the new behavior.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 20:31:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-3-11-adding-label-adds-html-tag-in/m-p/335090#M30968</guid>
      <dc:creator>DanRicketts</dc:creator>
      <dc:date>2015-01-06T20:31:11Z</dc:date>
    </item>
  </channel>
</rss>

