Ticket #3401: 3401_3.patch
File 3401_3.patch, 2.0 KB (added by , 13 years ago) |
---|
-
_source/plugins/image/dialogs/image.js
145 145 146 146 var imageDialog = function( editor, dialogType ) 147 147 { 148 var absoluteURLRegex = /^[\/\\]|:/;; 149 148 150 var onImgLoadEvent = function() 149 151 { 150 152 // Image is ready. … … 422 424 original.on( 'error', onImgLoadErrorEvent, dialog ); 423 425 original.on( 'abort', onImgLoadErrorEvent, dialog ); 424 426 original.setAttribute( 'src', newUrl ); 427 428 // Prepend base href for non-absolute url. 429 if( !absoluteURLRegex.test( newUrl ) ) 430 newUrl = editor.config.baseHref + '/' + newUrl; 431 425 432 dialog.preview.setAttribute( 'src', newUrl ); 426 433 427 434 updatePreview( dialog ); -
_source/plugins/flash/dialogs/flash.js
177 177 '<div id="FlashPreviewLoader" style="display:none"><div class="loading"> </div></div>' + 178 178 '<div id="FlashPreviewBox"></div></div>'; 179 179 180 var absoluteURLRegex = /^[\/\\]|:/; 181 180 182 return { 181 183 title : editor.lang.flash.title, 182 184 minWidth : 420, … … 315 317 setup : loadValue, 316 318 commit : commitValue, 317 319 onLoad : function() 318 {319 320 var dialog = this.getDialog(), 320 321 updatePreview = function( src ){ 321 322 323 // Prepend base href for non-absolute url. 324 if( !absoluteURLRegex.test( src ) ) 325 src = editor.config.baseHref + '/' + src; 326 322 327 dialog.preview.setHtml( '<embed height="100%" width="100%" src="' 323 328 + CKEDITOR.tools.htmlEncode( src ) 324 329 + '" type="application/x-shockwave-flash"></embed>' );