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

WordPress Trac noreply at wordpress.org
Mon Sep 7 10:39:17 UTC 2015


#32923: Google Maps - Visual Editor Breaks It
-------------------------------------+-----------------------------
 Reporter:  atomicjack               |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  TinyMCE                  |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |     Focuses:  administration
-------------------------------------+-----------------------------
Changes (by atomicjack):

 * keywords:  has-patch => has-patch needs-refresh


Comment:

 Replying to [comment:11 iseulde]:

 Tested on the latest 4.3.1 trunk, it breaks the map code entirely now, so
 that it doesn't display on the page, converts it into:


 {{{
 <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>
 }}}

 It works fine if you save it via the Text Editor and only ever use the
 text editor, but if you ever open it by mistake in Visual, you've broken
 it.

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


More information about the wp-trac mailing list