Select to view content in your preferred language

4.14 HTML in popupTemplate not rendering

714
1
Jump to solution
01-07-2020 01:32 PM
CharlieElverson
Emerging Contributor

In previous versions, I created a popuptemplate with <h1>, <img>, and other HTML elements. In 4.14, it looks like a TextContent in the popupTemplate should support that same type of content. So, I create the popupTemplate with something like this: 

{ content: [{ type: "text", text: x }] }

x is an html string with h1, h2, img, and table tags. 

It appears that none of these html tags are rendering. the <h1> and similar tags are printed on the screen as raw text. the img source is just empty, where it should be a base64 representation of a png.

I'm not surprised that the img source is being scrubbed out, that seems like it might be done for security, but why won't the h1 tags render? 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Hi there, 

Please see the reason and workaround for this from here

Thanks,

-Undral

View solution in original post

1 Reply
UndralBatsukh
Esri Regular Contributor

Hi there, 

Please see the reason and workaround for this from here

Thanks,

-Undral