<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[28748] trunk/src/wp-includes: wpView:</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/28748">28748</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2014-06-12 02:48:17 +0000 (Thu, 12 Jun 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>wpView:
- Don't wrap single-line URLs in [embed]. Use them directly in generating a view.
- If the embedding HTML contains a script, "sandbox" it in an iframe to prevent it from changing the editor DOM.
- Automatically add toolbar and overlay when needed.
- Try to embed single-line URLs only if they are pasted in an empty paragraph.
Props avryl, see <a href="http://core.trac.wordpress.org/ticket/28195">#28195</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesjsmceviewjs">trunk/src/wp-includes/js/mce-view.js</a></li>
<li><a href="#trunksrcwpincludesjstinymcepluginswpviewpluginjs">trunk/src/wp-includes/js/tinymce/plugins/wpview/plugin.js</a></li>
<li><a href="#trunksrcwpincludesmediatemplatephp">trunk/src/wp-includes/media-template.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesjsmceviewjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/mce-view.js (28747 => 28748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/mce-view.js     2014-06-11 21:04:56 UTC (rev 28747)
+++ trunk/src/wp-includes/js/mce-view.js        2014-06-12 02:48:17 UTC (rev 28748)
</span><span class="lines">@@ -8,7 +8,9 @@
</span><span class="cx"> // Ensure the global `wp` object exists.
</span><span class="cx"> window.wp = window.wp || {};
</span><span class="cx"> 
</span><del>-(function($){
</del><ins>+( function( $ ) {
+       'use strict';
+
</ins><span class="cx">   var views = {},
</span><span class="cx">          instances = {},
</span><span class="cx">          media = wp.media,
</span><span class="lines">@@ -27,6 +29,7 @@
</span><span class="cx">   */
</span><span class="cx">  wp.mce.View = function( options ) {
</span><span class="cx">          options = options || {};
</span><ins>+               this.type = options.type;
</ins><span class="cx">           _.extend( this, _.pick( options, viewOptions ) );
</span><span class="cx">          this.initialize.apply( this, arguments );
</span><span class="cx">  };
</span><span class="lines">@@ -35,22 +38,67 @@
</span><span class="cx">          initialize: function() {},
</span><span class="cx">          getHtml: function() {},
</span><span class="cx">          render: function() {
</span><del>-                       var html = this.getHtml();
-                       // Search all tinymce editor instances and update the placeholders
</del><ins>+                        this.setContent(
+                               '<div class="toolbar">' +
+                                       ( _.isFunction( views[ this.type ].edit ) ? '<div class="dashicons dashicons-edit edit"></div>' : '' ) +
+                                       '<div class="dashicons dashicons-no-alt remove"></div>' +
+                               '</div>' +
+                               '<div class="wpview-content">' +
+                                       this.getHtml() +
+                               '</div>' +
+                               ( this.overlay ? '<div class="wpview-overlay"></div>' : '' ) +
+                               // The <ins> is used to mark the end of the wrapper div (has to be the last child node).
+                               // Needed when comparing the content as string for preventing extra undo levels.
+                               '<ins data-wpview-end="1"></ins>',
+                               function( self, editor, node ) {
+                                       $( self ).trigger( 'ready', [ editor, node ] );
+                               }
+                       );
+               },
+               unbind: function() {},
+               setContent: function( html, callback, replace ) {
</ins><span class="cx">                   _.each( tinymce.editors, function( editor ) {
</span><span class="cx">                          var self = this;
</span><span class="cx">                          if ( editor.plugins.wpview ) {
</span><del>-                                       $( editor.getDoc() ).find( '[data-wpview-text="' + this.encodedText + '"]' ).each( function ( i, element ) {
-                                               var node = $( element );
-                                               // The <ins> is used to mark the end of the wrapper div. Needed when comparing
-                                               // the content as string for preventing extra undo levels.
-                                               node.html( html ).append( '<ins data-wpview-end="1"></ins>' );
-                                               $( self ).trigger( 'ready', element );
-                                       });
</del><ins>+                                        $( editor.getBody() )
+                                       .find( '[data-wpview-text="' + this.encodedText + '"]' )
+                                       .each( function ( i, element ) {
+                                               var contentWrap = $( element ).children( '.wpview-content' ),
+                                                       wrap = element;
+
+                                               if ( contentWrap.length ) {
+                                                       element = contentWrap = contentWrap[0];
+                                               }
+
+                                               if ( _.isString( html ) ) {
+                                                       if ( replace ) {
+                                                               element = editor.dom.replace( editor.dom.createFragment( html ), wrap );
+                                                       } else {
+                                                               editor.dom.setHTML( element, html );
+                                                       }
+                                               } else {
+                                                       if ( replace ) {
+                                                               element = editor.dom.replace( html, wrap );
+                                                       } else {
+                                                               element.appendChild( html );
+                                                       }
+                                               }
+
+                                               if ( _.isFunction( callback ) ) {
+                                                       callback( self, editor, $( element ).children( '.wpview-content' )[0] );
+                                               }
+                                       } );
</ins><span class="cx">                           }
</span><span class="cx">                  }, this );
</span><span class="cx">          },
</span><del>-               unbind: function() {}
</del><ins>+                setError: function( message, dashicon ) {
+                       this.setContent(
+                               '<div class="wpview-error">' +
+                                       '<div class="dashicons dashicons-' + ( dashicon ? dashicon : 'no' ) + '"></div>' +
+                                       '<p>' + message + '</p>' +
+                               '</div>'
+                       );
+               }
</ins><span class="cx">   } );
</span><span class="cx"> 
</span><span class="cx">  // take advantage of the Backbone extend method
</span><span class="lines">@@ -209,6 +257,7 @@
</span><span class="cx"> 
</span><span class="cx">                  if ( ! wp.mce.views.getInstance( encodedText ) ) {
</span><span class="cx">                          viewOptions = options;
</span><ins>+                               viewOptions.type = viewType;
</ins><span class="cx">                           viewOptions.encodedText = encodedText;
</span><span class="cx">                          instance = new view.View( viewOptions );
</span><span class="cx">                          instances[ encodedText ] = instance;
</span><span class="lines">@@ -244,6 +293,7 @@
</span><span class="cx">                  if ( ! instance ) {
</span><span class="cx">                          result = view.toView( text );
</span><span class="cx">                          viewOptions = result.options;
</span><ins>+                               viewOptions.type = view.type;
</ins><span class="cx">                           viewOptions.encodedText = encodedText;
</span><span class="cx">                          instance = new view.View( viewOptions );
</span><span class="cx">                          instances[ encodedText ] = instance;
</span><span class="lines">@@ -331,7 +381,6 @@
</span><span class="cx">                          };
</span><span class="cx"> 
</span><span class="cx">                          return this.template( options );
</span><del>-
</del><span class="cx">                   }
</span><span class="cx">          },
</span><span class="cx"> 
</span><span class="lines">@@ -361,6 +410,8 @@
</span><span class="cx">          loaded: false,
</span><span class="cx"> 
</span><span class="cx">          View: _.extend( {}, wp.media.mixin, {
</span><ins>+                       overlay: true,
+
</ins><span class="cx">                   initialize: function( options ) {
</span><span class="cx">                          this.players = [];
</span><span class="cx">                          this.shortcode = options.shortcode;
</span><span class="lines">@@ -375,32 +426,23 @@
</span><span class="cx">                   *
</span><span class="cx">                   * @global MediaElementPlayer
</span><span class="cx">                   *
</span><del>-                        * @param {Event} e
</del><ins>+                         * @param {Event} event
+                        * @param {Object} editor
</ins><span class="cx">                    * @param {HTMLElement} node
</span><span class="cx">                   */
</span><del>-                       setPlayer: function(e, node) {
-                               // if the ready event fires on an empty node
-                               if ( ! node ) {
-                                       return;
-                               }
-
</del><ins>+                        setPlayer: function( event, editor, node ) {
</ins><span class="cx">                           var self = this,
</span><del>-                                       media,
-                                       firefox = this.ua.is( 'ff' ),
-                                       className = '.wp-' +  this.shortcode.tag + '-shortcode';
</del><ins>+                                        media;
</ins><span class="cx"> 
</span><del>-                               media = $( node ).find( className );
</del><ins>+                                media = $( node ).find( '.wp-' +  this.shortcode.tag + '-shortcode' );
</ins><span class="cx"> 
</span><span class="cx">                          if ( ! this.isCompatible( media ) ) {
</span><span class="cx">                                  media.closest( '.wpview-wrap' ).addClass( 'wont-play' );
</span><del>-                                       if ( ! media.parent().hasClass( 'wpview-wrap' ) ) {
-                                               media.parent().replaceWith( media );
-                                       }
</del><span class="cx">                                   media.replaceWith( '<p>' + media.find( 'source' ).eq(0).prop( 'src' ) + '</p>' );
</span><span class="cx">                                  return;
</span><span class="cx">                          } else {
</span><span class="cx">                                  media.closest( '.wpview-wrap' ).removeClass( 'wont-play' );
</span><del>-                                       if ( firefox ) {
</del><ins>+                                        if ( this.ua.is( 'ff' ) ) {
</ins><span class="cx">                                           media.prop( 'preload', 'metadata' );
</span><span class="cx">                                  } else {
</span><span class="cx">                                          media.prop( 'preload', 'none' );
</span><span class="lines">@@ -508,6 +550,7 @@
</span><span class="cx">          state: ['playlist-edit', 'video-playlist-edit'],
</span><span class="cx">          View: _.extend( {}, wp.media.mixin, {
</span><span class="cx">                  template:  media.template( 'editor-playlist' ),
</span><ins>+                       overlay: true,
</ins><span class="cx"> 
</span><span class="cx">                  initialize: function( options ) {
</span><span class="cx">                          this.players = [];
</span><span class="lines">@@ -531,7 +574,7 @@
</span><span class="cx">                          this.dfd = this.attachments.more().done( _.bind( this.render, this ) );
</span><span class="cx">                  },
</span><span class="cx"> 
</span><del>-                       setPlaylist: function( event, element ) {
</del><ins>+                        setPlaylist: function( event, editor, element ) {
</ins><span class="cx">                           if ( ! this.data.tracks ) {
</span><span class="cx">                                  return;
</span><span class="cx">                          }
</span><span class="lines">@@ -634,60 +677,161 @@
</span><span class="cx">  /**
</span><span class="cx">   * TinyMCE handler for the embed shortcode
</span><span class="cx">   */
</span><del>-       wp.mce.views.register( 'embed', {
-               View: _.extend( {}, wp.media.mixin, {
-                       template: media.template( 'editor-embed' ),
-                       initialize: function( options ) {
-                               this.players = [];
-                               this.content = options.content;
-                               this.parsed = false;
-                               this.shortcode = options.shortcode;
-                               _.bindAll( this, 'setHtml', 'setNode', 'fetch' );
-                               $( this ).on( 'ready', this.setNode );
-                       },
-                       unbind: function() {
-                               var self = this;
-                               _.each( this.players, function ( player ) {
-                                       player.pause();
-                                       self.removePlayer( player );
-                               } );
-                               this.players = [];
-                       },
-                       setNode: function ( e, node ) {
-                               this.node = node;
-                               if ( this.parsed ) {
-                                       this.parseMediaShortcodes();
</del><ins>+        wp.mce.embedView = _.extend( {}, wp.media.mixin, {
+               overlay: true,
+               initialize: function( options ) {
+                       this.players = [];
+                       this.content = options.content;
+                       this.fetching = false;
+                       this.parsed = false;
+                       this.original = options.url || options.shortcode.string();
+
+                       if ( options.url ) {
+                               this.shortcode = '[embed]' + options.url + '[/embed]';
+                       } else {
+                               this.shortcode = options.shortcode.string();
+                       }
+
+                       _.bindAll( this, 'setHtml', 'setNode', 'fetch' );
+                       $( this ).on( 'ready', this.setNode );
+               },
+               unbind: function() {
+                       var self = this;
+                       _.each( this.players, function ( player ) {
+                               player.pause();
+                               self.removePlayer( player );
+                       } );
+                       this.players = [];
+               },
+               setNode: function () {
+                       if ( this.parsed ) {
+                               this.setHtml( this.parsed );
+                               this.parseMediaShortcodes();
+                       } else if ( ! this.fetching ) {
+                               this.fetch();
+                       }
+               },
+               fetch: function () {
+                       var self = this;
+
+                       this.fetching = true;
+
+                       wp.ajax.send( 'parse-embed', {
+                               data: {
+                                       post_ID: $( '#post_ID' ).val(),
+                                       content: this.shortcode
+                               }
+                       } )
+                       .done( function( content ) {
+                               self.fetching = false;
+
+                               if ( content.substring( 0, ( '<a href' ).length ) === '<a href' ) {
+                                       if ( self.type === 'embed' ) {
+                                               self.setError( self.original + ' failed to embed.', 'admin-media' );
+                                       } else {
+                                               self.setContent( self.original, null, true );
+                                       }
</ins><span class="cx">                           } else {
</span><del>-                                       this.fetch();
</del><ins>+                                        self.parsed = content;
+                                       self.setHtml( content );
</ins><span class="cx">                           }
</span><del>-                       },
-                       fetch: function () {
-                               wp.ajax.send( 'parse-embed', {
-                                       data: {
-                                               post_ID: $( '#post_ID' ).val(),
-                                               content: this.shortcode.string()
</del><ins>+                        } )
+                       .fail( function() {
+                               self.fetching = false;
+                               self.setError( self.original + ' failed to embed due to a server error.', 'admin-media' );
+                       } );
+               },
+               /* jshint scripturl: true */
+               setHtml: function ( content ) {
+                       var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver,
+                               iframe, iframeDoc, i, resize,
+                               dom = tinymce.DOM;
+
+                       if ( content.indexOf( '<script' ) !== -1 ) {
+                               iframe = dom.create( 'iframe', {
+                                       src: tinymce.Env.ie ? 'javascript:""' : '',
+                                       frameBorder: '0',
+                                       allowTransparency: 'true',
+                                       style: {
+                                               width: '100%',
+                                               display: 'block'
</ins><span class="cx">                                   }
</span><del>-                               } ).done( this.setHtml );
-                       },
-                       setHtml: function ( content ) {
-                               this.parsed = content;
-                               $( this.node ).html( this.getHtml() );
-                               this.parseMediaShortcodes();
-                       },
-                       parseMediaShortcodes: function () {
-                               var self = this;
-                               $( '.wp-audio-shortcode, .wp-video-shortcode', this.node ).each( function ( i, element ) {
-                                       self.players.push( new MediaElementPlayer( element, self.mejsSettings ) );
</del><span class="cx">                           } );
</span><del>-                       },
-                       getHtml: function() {
-                               if ( ! this.parsed ) {
-                                       return '';
</del><ins>+
+                               this.setContent( iframe );
+                               iframeDoc = iframe.contentWindow.document;
+
+                               iframeDoc.open();
+                               iframeDoc.write(
+                                       '<!DOCTYPE html>' +
+                                       '<html>' +
+                                               '<head>' +
+                                                       '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' +
+                                               '</head>' +
+                                               '<body>' +
+                                                       content +
+                                               '</body>' +
+                                       '</html>'
+                               );
+                               iframeDoc.close();
+
+                               resize = function() {
+                                       $( iframe ).height( $( iframeDoc ).height() );
+                               };
+
+                               if ( MutationObserver ) {
+                                       new MutationObserver( _.debounce( function() {
+                                               resize();
+                                       }, 100 ) )
+                                       .observe( iframeDoc.body, {
+                                               attributes: true,
+                                               childList: true,
+                                               subtree: true
+                                       } );
+                               } else {
+                                       for ( i = 1; i < 6; i++ ) {
+                                               setTimeout( resize, i * 700 );
+                                       }
</ins><span class="cx">                           }
</span><del>-                               return this.template({ content: this.parsed });
</del><ins>+                        } else {
+                               this.setContent( content );
</ins><span class="cx">                   }
</span><del>-               } ),
-               edit: function() {}
</del><ins>+
+                       this.parseMediaShortcodes();
+               },
+               parseMediaShortcodes: function () {
+                       var self = this;
+                       $( '.wp-audio-shortcode, .wp-video-shortcode', this.node ).each( function ( i, element ) {
+                               self.players.push( new MediaElementPlayer( element, self.mejsSettings ) );
+                       } );
+               },
+               getHtml: function() {
+                       return '';
+               }
</ins><span class="cx">   } );
</span><span class="cx"> 
</span><ins>+       wp.mce.views.register( 'embed', {
+               View: wp.mce.embedView
+       } );
+
+       wp.mce.views.register( 'embedURL', {
+               toView: function( content ) {
+                       var re = /(?:^|<p>)(https?:\/\/[^\s"]+?)(?:<\/p>\s*|$)/gi,
+                               match = re.exec( tinymce.trim( content ) );
+
+                       if ( ! match ) {
+                               return;
+                       }
+
+                       return {
+                               index: match.index,
+                               content: match[0],
+                               options: {
+                                       url: match[1]
+                               }
+                       };
+               },
+               View: wp.mce.embedView
+       } );
+
</ins><span class="cx"> }(jQuery));
</span></span></pre></div>
<a id="trunksrcwpincludesjstinymcepluginswpviewpluginjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/plugins/wpview/plugin.js (28747 => 28748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/plugins/wpview/plugin.js        2014-06-11 21:04:56 UTC (rev 28747)
+++ trunk/src/wp-includes/js/tinymce/plugins/wpview/plugin.js   2014-06-12 02:48:17 UTC (rev 28748)
</span><span class="lines">@@ -158,6 +158,8 @@
</span><span class="cx">  // matching view patterns, and transform the matches into
</span><span class="cx">  // view wrappers.
</span><span class="cx">  editor.on( 'BeforeSetContent', function( event ) {
</span><ins>+               var node;
+
</ins><span class="cx">           if ( ! event.content ) {
</span><span class="cx">                  return;
</span><span class="cx">          }
</span><span class="lines">@@ -166,15 +168,17 @@
</span><span class="cx">                  wp.mce.views.unbind( editor );
</span><span class="cx">          }
</span><span class="cx"> 
</span><ins>+               node = editor.selection.getNode();
+
+               // When a url is pasted, only try to embed it when pasted in an empty paragrapgh.
+               if ( event.content.match( /^\s*(https?:\/\/[^\s"]+)\s*$/i ) &&
+                       ( node.nodeName !== 'P' || node.parentNode !== editor.getBody() || ! editor.dom.isEmpty( node ) ) ) {
+                       return;
+               }
+
</ins><span class="cx">           event.content = wp.mce.views.toViews( event.content );
</span><span class="cx">  });
</span><span class="cx"> 
</span><del>-       editor.on( 'PastePreProcess', function( event ) {
-               if ( event.content.match( /^\s*(https?:\/\/[^\s"]+)\s*$/im ) ) {
-                       event.content = '[embed]' + event.content + '[/embed]';
-               }
-       } );
-
</del><span class="cx">   // When the editor's content has been updated and the DOM has been
</span><span class="cx">  // processed, render the views in the document.
</span><span class="cx">  editor.on( 'SetContent', function( event ) {
</span></span></pre></div>
<a id="trunksrcwpincludesmediatemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/media-template.php (28747 => 28748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/media-template.php 2014-06-11 21:04:56 UTC (rev 28747)
+++ trunk/src/wp-includes/media-template.php    2014-06-12 02:48:17 UTC (rev 28748)
</span><span class="lines">@@ -994,9 +994,6 @@
</span><span class="cx">  </script>
</span><span class="cx"> 
</span><span class="cx">  <script type="text/html" id="tmpl-editor-gallery">
</span><del>-               <div class="toolbar">
-                       <div class="dashicons dashicons-edit edit"></div><div class="dashicons dashicons-no-alt remove"></div>
-               </div>
</del><span class="cx">           <# if ( data.attachments ) { #>
</span><span class="cx">                  <div class="gallery gallery-columns-{{ data.columns }}">
</span><span class="cx">                          <# _.each( data.attachments, function( attachment, index ) { #>
</span><span class="lines">@@ -1027,30 +1024,16 @@
</span><span class="cx">  </script>
</span><span class="cx"> 
</span><span class="cx">  <script type="text/html" id="tmpl-editor-audio">
</span><del>-               <div class="toolbar">
-                       <div class="dashicons dashicons-edit edit"></div>
-                       <div class="dashicons dashicons-no-alt remove"></div>
-               </div>
</del><span class="cx">           <?php wp_underscore_audio_template() ?>
</span><del>-               <div class="wpview-overlay"></div>
</del><span class="cx">   </script>
</span><span class="cx"> 
</span><span class="cx">  <script type="text/html" id="tmpl-editor-video">
</span><del>-               <div class="toolbar">
-                       <div class="dashicons dashicons-edit edit"></div>
-                       <div class="dashicons dashicons-no-alt remove"></div>
-               </div>
</del><span class="cx">           <?php wp_underscore_video_template() ?>
</span><del>-               <div class="wpview-overlay"></div>
</del><span class="cx">   </script>
</span><span class="cx"> 
</span><span class="cx">  <?php wp_underscore_playlist_templates() ?>
</span><span class="cx"> 
</span><span class="cx">  <script type="text/html" id="tmpl-editor-playlist">
</span><del>-               <div class="toolbar">
-                       <div class="dashicons dashicons-edit edit"></div>
-                       <div class="dashicons dashicons-no-alt remove"></div>
-               </div>
</del><span class="cx">           <# if ( data.tracks ) { #>
</span><span class="cx">                  <div class="wp-playlist wp-{{ data.type }}-playlist wp-playlist-{{ data.style }}">
</span><span class="cx">                          <# if ( 'audio' === data.type ){ #>
</span><span class="lines">@@ -1062,7 +1045,6 @@
</span><span class="cx">                          <div class="wp-playlist-next"></div>
</span><span class="cx">                          <div class="wp-playlist-prev"></div>
</span><span class="cx">                  </div>
</span><del>-                       <div class="wpview-overlay"></div>
</del><span class="cx">           <# } else { #>
</span><span class="cx">                  <div class="wpview-error">
</span><span class="cx">                          <div class="dashicons dashicons-video-alt3"></div><p><?php _e( 'No items found.' ); ?></p>
</span><span class="lines">@@ -1075,14 +1057,6 @@
</span><span class="cx">          <div class="upload-errors"></div>
</span><span class="cx">  </script>
</span><span class="cx"> 
</span><del>-       <script type="text/html" id="tmpl-editor-embed">
-               <div class="toolbar">
-                       <div class="dashicons dashicons-no-alt remove"></div>
-               </div>
-               {{{ data.content }}}
-               <div class="wpview-overlay"></div>
-       </script>
-
</del><span class="cx">   <?php
</span><span class="cx"> 
</span><span class="cx">  /**
</span></span></pre>
</div>
</div>

</body>
</html>