Make WordPress Core

Ticket #27909: 27909.2.patch

File 27909.2.patch, 1.7 KB (added by netweb, 11 years ago)
  • src/wp-includes/js/tinymce/plugins/paste/plugin.js

     
    208208 *  2. Wait for the browser to fire a "paste" event and get the contents out of the paste bin.
    209209 *  3. Check if the paste was successful if true, process the HTML.
    210210 *  (4). If the paste was unsuccessful use IE execCommand, Clipboard API, document.dataTransfer old WebKit API etc.
    211  * 
     211 *
    212212 * @class tinymce.pasteplugin.Clipboard
    213213 * @private
    214214 */
     
    10361036                                                if (!href && !name) {
    10371037                                                        node.unwrap();
    10381038                                                } else {
    1039                                                         if (name && name.indexOf('Toc') !== 0) {
     1039                                                        // Remove all named anchors that isn't toc specific
     1040                                                        if (name && !/^_?(?:toc|edn|ftn)/i.test(name)) {
    10401041                                                                node.unwrap();
    10411042                                                                continue;
    10421043                                                        }
     
    11121113                 */
    11131114                function removeWebKitFragments(html) {
    11141115                        html = Utils.filter(html, [
    1115                                 /^[\s\S]*<!--StartFragment-->|<!--EndFragment-->[\s\S]*$/g, // WebKit fragment
     1116                                /^[\s\S]*<body[^>]*>\s*<!--StartFragment-->|<!--EndFragment-->\s*<\/body[^>]*>[\s\S]*$/g, // WebKit fragment body
     1117                                /<!--StartFragment-->|<!--EndFragment-->/g, // Inner fragments (tables from excel on mac)
    11161118                                [/<span class="Apple-converted-space">\u00a0<\/span>/g, '\u00a0'], // WebKit &nbsp;
    11171119                                /<br>$/i // Traling BR elements
    11181120                        ]);
     
    13441346});
    13451347
    13461348expose(["tinymce/pasteplugin/Utils","tinymce/pasteplugin/Clipboard","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Quirks","tinymce/pasteplugin/Plugin"]);
    1347 })(this);
    1348  No newline at end of file
     1349})(this);