title: How to override target=_blank in KML popups in embedded Google map?
body: <p>I'm using KML to overlay shapes on a Google map. Information corresponding to each shape is included in the <code>&lt;description&gt;</code> element, along with a link to a detail page corresponding to that shape.</p>
  
  <p>So for example, my KML includes this:</p>
  
  <pre><code>&lt;description&gt;
      &lt;![CDATA[
      &lt;div&gt;
  
       ...
  
          &lt;p&gt;
              &lt;a href="Concession.20.aspx"&gt;View details&lt;/a&gt;
          &lt;/p&gt;
          &amp;nbsp;
      &lt;/div&gt;
  ]]&gt;
  </code></pre>
  
  <p></p>
  
  <p>Of course, I would like for that link to open in the same window, since it's just navigating to another page on this same site. Unfortunately, <a href="http://code.google.com/apis/kml/documentation/kmlreference.html#feature" rel="noreferrer">as documented here</a>, links embedded in the <code>&lt;description&gt;</code> element of a KML file are rewritten with <code>target='_blank'</code>.</p>
  
  <blockquote>
    <p>Targets are ignored when included in
    HTML written directly into the KML;
    all such links are opened as if the
    target is set to _blank. Any specified
    targets are ignored.</p>
  </blockquote>
  
  <p>My question: Can anyone think of a workaround that would override this (obnoxious, IMHO) behavior and force these links to open in the same window? </p>
  
  <p>As an example of one approach, I'm currently trying to override the click event on these links (using jQuery), but they're generated dynamically by Google maps and I can't seem to get a hold of them early enough.</p>