Can't view embedded Google Maps because "Internet Explorer has modified this page to help prevent cross-site scripting"
The offending page is http://beta.westlake.school.nz开发者_StackOverflow中文版/school-details if viewed using IE8
In my case, this seemed to be caused by a couple of single quotes in the hnear
argument in the Google URL. Removing the quotes in both the iframe src
and the a href
attributes fixed the problem.
For example,
<a href="http://maps.google.com/maps/ms?source=embed&hl=fr&geocode=&aq=&ie=UTF8&hq=&hnear=Ch%C3%A2teau-d'%C5%92x,+Riviera-Pays-d'Enhaut,+Vaud,+Switzerland&msa=0&ll=46.472921,7.130213&spn=0.021578,0.055747&msid=208989902893156915814.0004a534bae54848e2335">
became
<a href="http://maps.google.com/maps/ms?source=embed&hl=fr&geocode=&aq=&ie=UTF8&hq=&hnear=Ch%C3%A2teau-d%C5%92x,+Riviera-Pays-dEnhaut,+Vaud,+Switzerland&msa=0&ll=46.472921,7.130213&spn=0.021578,0.055747&msid=208989902893156915814.0004a534bae54848e2335">
Not sure whether that's because Google didn't need the argument in my case, or whether it could handle the modification gracefully.
精彩评论