Google Earth API unable to render href link containing "javascript" word

98 views Asked by At

I am providing a KML file to Google Earth API containing html table to view some hyperlinks on Google Earth plugin using IE 11. This table consists of some textual descriptions which are actually hyperlinks as well. For example, consider below section from KML file:

<description><![CDATA[
  <table width="500px" bordercolor="black"> 
    <tr style="font-size:10px;color:#000000;font-family:Verdana;background-color:#d9e6ea;font-weight:bold;" bgcolor="#c9c9c9">
      <td style="word-break:break-all;">Description</td>
      <td style="word-break:break-all;">Time</td>
      <td style="word-break:break-all;">Location Of</td>
    </tr>
    <tr style="font-size:10px;color:#000000;font-family:Verdana;background-color:#d9e6ea;" bgcolor="#c9c9c9">
      <td style="word-break:break-all;white-space:normal;" width="45%">
        <a href="http://www.google.com">itsmysite</a>
      </td>
      <td style="word-break:break-all;white-space:normal;" width="20%">19/09/2016 19:34:05</td>
      <td style="word-break:break-all;white-space:normal;" width="30%"> [ Src ] </td>
    </tr>
  </table>
]]></description>

Now, as you can see the above table would generate an html table on Google Earth API with link description as "itsmysite" with its hyper link pointed to google site. This works fine. I am able to see the description("itsmysite") on API as a hyperlink and on clicking this it takes me to google site.

Now, the issue occurs when I am providing 'javascript' word in the href tag. For example, if I replace the description with the following in above KML file:

<a href="http://www.googlejavascript.com">itsmysite</a>

Google Earth API does not render it as hyperlink. I need to give 'javascript' parameter in my URL as follows:

<a href="example.com/home?param1=javascript&param2=123">itsmysite</a>

Right now, Google Earth API simply renders the Table(even after providing 'javascript' in href tag) and when I navigate to the description using browser developer tools, I see that whole href tag is missing.

I am not sure whether it is a bug or if I am not doing it correctly. Please suggest.

Thanks.

0

There are 0 answers