git-svn-id: https://develop.svn.wordpress.org/trunk@28192 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2014-04-24 00:58:13 +00:00
parent 34b0686be1
commit fff29139b5
2 changed files with 5 additions and 3 deletions
@@ -1036,7 +1036,8 @@ define("tinymce/pasteplugin/WordFilter", [
if (!href && !name) {
node.unwrap();
} else {
if (name && name.indexOf('Toc') !== 0) {
// Remove all named anchors that isn't toc specific
if (name && !/^_?toc/i.test(name)) {
node.unwrap();
continue;
}
@@ -1112,7 +1113,8 @@ define("tinymce/pasteplugin/Quirks", [
*/
function removeWebKitFragments(html) {
html = Utils.filter(html, [
/^[\s\S]*<!--StartFragment-->|<!--EndFragment-->[\s\S]*$/g, // WebKit fragment
/^[\s\S]*<body[^>]*>\s*<!--StartFragment-->|<!--EndFragment-->\s*<\/body[^>]*>[\s\S]*$/g, // WebKit fragment body
/<!--StartFragment-->|<!--EndFragment-->/g, // Inner fragments (tables from excel on mac)
[/<span class="Apple-converted-space">\u00a0<\/span>/g, '\u00a0'], // WebKit &nbsp;
/<br>$/i // Traling BR elements
]);
File diff suppressed because one or more lines are too long