[wp-trac] [WordPress Trac] #32923: Google Maps - Visual Editor Breaks It

WordPress Trac noreply at wordpress.org
Wed Jul 8 12:58:52 UTC 2015


#32923: Google Maps - Visual Editor Breaks It
--------------------------+------------------------------
 Reporter:  atomicjack    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Editor        |     Version:  4.2.2
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  administration
--------------------------+------------------------------

Comment (by atomicjack):

 This is the code that it renders in the text editor after the visual
 editor has broken it:


 {{{
 <script src="http://maps.google.com/maps/api/js?sensor=true"
 type="text/javascript"></script>

 <div style="overflow: hidden; height: 500px; width: 600px;">
 <div id="gmap_canvas" style="height: 500px; width: 600px;"></div>

 <a id="get-map-data" class="google-map-code" href="http://www.map-
 embed.com">google maps</a>
 </div>

 <script src="http://maps.google.com/maps/api/js?sensor=true"
 type="text/javascript"></script>
 <div style="overflow: hidden; height: 500px; width: 600px;">
 <div id="gmap_canvas" style="height: 500px; width: 600px;"></div>
 <a id="get-map-data" class="google-map-code" href="http://www.map-
 embed.com">google maps</a>
 </div>
 <script type="text/javascript">// <![CDATA[
 function init_map(){var myOptions = {zoom:14,center:new
 google.maps.LatLng(52.1454123,-1.73884709999993),mapTypeId:
 google.maps.MapTypeId.ROADMAP};map = new
 google.maps.Map(document.getElementById("gmap_canvas"), myOptions);marker
 = new google.maps.Marker({map: map,position: new
 google.maps.LatLng(52.1454123, -1.73884709999993)});infowindow = new
 google.maps.InfoWindow({content:"<b>Warwickshire</b>
 Warickshire
  Warwickshire" });google.maps.event.addListener(marker, "click",
 function(){infowindow.open(map,marker);});infowindow.open(map,marker);}google.maps.event.addDomListener(window,
 'load', init_map);
 // ]]></script>
 }}}

 Originally the code was:


 {{{
  <script type="text/javascript"
 src="http://maps.google.com/maps/api/js?sensor=true"></script><div
 style="overflow:hidden;height:500px;width:600px;"><div id="gmap_canvas"
 style="height:500px;width:600px;"></div><style>#gmap_canvas img{max-
 width:none!important;background:none!important}</style><a class="google-
 map-code" href="http://www.map-embed.com" id="get-map-data">google
 maps</a></div><script type="text/javascript"> function init_map(){var
 myOptions = {zoom:14,center:new
 google.maps.LatLng(52.1454123,-1.73884709999993),mapTypeId:
 google.maps.MapTypeId.ROADMAP};map = new
 google.maps.Map(document.getElementById("gmap_canvas"), myOptions);marker
 = new google.maps.Marker({map: map,position: new
 google.maps.LatLng(52.1454123, -1.73884709999993)});infowindow = new
 google.maps.InfoWindow({content:"<b>Warwickshire</b><br/>Warickshire<br/>
 Warwickshire" });google.maps.event.addListener(marker, "click",
 function(){infowindow.open(map,marker);});infowindow.open(map,marker);}google.maps.event.addDomListener(window,
 'load', init_map);</script>
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32923#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list