Question

How can I add a hyperlink on my map in the html report

  • 14 July 2021
  • 1 reply
  • 6 views

Badge +1

Hi, I am trying to get a hyperlink when I click on a point map created by html report generator, using esri leaflet. I attach an image of what I got if I use the same hyperlink I have used in the table (correct hyperlinks). What would be a good approach? ThanksReporteDiarioSismos


1 reply

Userlevel 3
Badge +17

Hi @juandiegoboh​ 

You're seeing this behaviour as the HTMLReportGenerator converts certain characters in the hyperlink into HTML entities. You can see this by viewing the HTML output--you should see characters such as < and >. This is to avoid reserved HTML characters being interpreted as HTML code in the output. In your case, you do want those characters to be interpreted as HTML.

 

Try using the TextDecoder to decode these characters and single quotes within the HTML tag (eg. <a href='http://www.safe.com' target='_blank'>Safe Software</a>). The hyperlinks should appear correctly in the popup.

Reply