~canonical-sysadmins/wordpress/4.2.4

« back to all changes in this revision

Viewing changes to wp-includes/js/tinymce/plugins/image/plugin.js

  • Committer: Nick Moffitt
  • Date: 2015-01-15 11:05:37 UTC
  • mfrom: (1.1.1 wp4-upstream)
  • Revision ID: nick.moffitt@canonical.com-20150115110537-8bp1y42eyg0jsa7c
Tags: 4.1
MergeĀ upstreamĀ versionĀ 4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
228
228
                        });
229
229
 
230
230
                        if (!meta.width && !meta.height) {
 
231
                                var srcURL = this.value(),
 
232
                                absoluteURLPattern = new RegExp('^(?:[a-z]+:)?//', 'i'),
 
233
                                baseURL = editor.settings.document_base_url;
 
234
 
 
235
                                //Pattern test the src url and make sure we haven't already prepended the url
 
236
                                if (baseURL && !absoluteURLPattern.test(srcURL) && srcURL.substring(0, baseURL.length) !== baseURL) {
 
237
                                        this.value(baseURL + srcURL);
 
238
                                }
 
239
 
231
240
                                getImageSize(this.value(), function(data) {
232
241
                                        if (data.width && data.height && imageDimensions) {
233
242
                                                width = data.width;