-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
187 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* Removes the charset meta tag inserted by Chromium, along with any other ones. | ||
* See: | ||
* - https://github.com/WordPress/gutenberg/issues/33585 | ||
* - https://bugs.chromium.org/p/chromium/issues/detail?id=1264616#c4 | ||
* | ||
* @param {Node} node The node to be processed. | ||
*/ | ||
export default function metaRemover( node ) { | ||
if ( node.nodeName === 'META' ) { | ||
node.remove(); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
packages/blocks/src/api/raw-handling/ms-fragment-remover.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { remove } from '@wordpress/dom'; | ||
|
||
/** | ||
* Windows-specific "Fragment" comments. | ||
* | ||
* @param {Node} node The node to be processed. | ||
*/ | ||
export default function msFragmentRemover( node ) { | ||
if ( | ||
node.nodeType === node.COMMENT_NODE && | ||
[ 'StartFragment', 'EndFragment' ].includes( node.textContent.trim() ) | ||
) { | ||
remove( node ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { unwrap } from '@wordpress/dom'; | ||
|
||
export default function wrapperRemover( node ) { | ||
if ( [ 'BODY', 'HTML' ].includes( node.nodeName ) ) { | ||
unwrap( node ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import { lock } from './lock-unlock'; | ||
import { getClipboardEventData } from './api/raw-handling/get-clipboard-event-data'; | ||
|
||
/** | ||
* Private @wordpress/blocks APIs. | ||
*/ | ||
export const privateApis = {}; | ||
lock( privateApis, { | ||
getClipboardEventData, | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<html xmlns:o="urn:schemas-microsoft-com:office:office" | ||
xmlns:x="urn:schemas-microsoft-com:office:excel" | ||
xmlns="http://www.w3.org/TR/REC-html40"> | ||
|
||
<head> | ||
<meta http-equiv=Content-Type content="text/html; charset=utf-8"> | ||
<meta name=ProgId content=Excel.Sheet> | ||
<meta name=Generator content="Microsoft Excel 15"> | ||
<link id=Main-File rel=Main-File | ||
href="file:///C:/Users/TETSUA~1.HAM/AppData/Local/Temp/msohtmlclip1/01/clip.htm"> | ||
<link rel=File-List | ||
href="file:///C:/Users/TETSUA~1.HAM/AppData/Local/Temp/msohtmlclip1/01/clip_filelist.xml"> | ||
<style> | ||
<!--table | ||
{mso-displayed-decimal-separator:"\."; | ||
mso-displayed-thousand-separator:"\,";} | ||
@page | ||
{margin:.75in .7in .75in .7in; | ||
mso-header-margin:.3in; | ||
mso-footer-margin:.3in;} | ||
.font5 | ||
{color:windowtext; | ||
font-size:6.0pt; | ||
font-weight:400; | ||
font-style:normal; | ||
text-decoration:none; | ||
font-family:游ゴシック, monospace; | ||
mso-font-charset:128;} | ||
tr | ||
{mso-height-source:auto; | ||
mso-ruby-visibility:none;} | ||
col | ||
{mso-width-source:auto; | ||
mso-ruby-visibility:none;} | ||
br | ||
{mso-data-placement:same-cell;} | ||
td | ||
{padding-top:1px; | ||
padding-right:1px; | ||
padding-left:1px; | ||
mso-ignore:padding; | ||
color:black; | ||
font-size:11.0pt; | ||
font-weight:400; | ||
font-style:normal; | ||
text-decoration:none; | ||
font-family:游ゴシック, monospace; | ||
mso-font-charset:128; | ||
mso-number-format:General; | ||
text-align:general; | ||
vertical-align:bottom; | ||
border:none; | ||
mso-background-source:auto; | ||
mso-pattern:auto; | ||
mso-protection:locked visible; | ||
white-space:nowrap; | ||
mso-rotate:0;} | ||
.xl65 | ||
{font-family:"Noto Sans JP", sans-serif; | ||
mso-font-charset:128;} | ||
ruby | ||
{ruby-align:left;} | ||
rt | ||
{color:windowtext; | ||
font-size:6.0pt; | ||
font-weight:400; | ||
font-style:normal; | ||
text-decoration:none; | ||
font-family:游ゴシック, monospace; | ||
mso-font-charset:128; | ||
mso-char-type:katakana; | ||
display:none;} | ||
--> | ||
</style> | ||
</head> | ||
|
||
<body link="#0563C1" vlink="#954F72"> | ||
|
||
<table border=0 cellpadding=0 cellspacing=0 width=140 style='border-collapse: | ||
collapse;width:106pt'> | ||
<!--StartFragment--> | ||
<col width=70 span=2 style='width:53pt'> | ||
<tr height=24 style='height:18.0pt'> | ||
<td height=24 class=xl65 width=70 style='height:18.0pt;width:53pt'>Cell 1</td> | ||
<td class=xl65 width=70 style='width:53pt'>Cell 2</td> | ||
</tr> | ||
<tr height=24 style='height:18.0pt'> | ||
<td height=24 class=xl65 style='height:18.0pt'>Cell 3</td> | ||
<td class=xl65>Cell 4</td> | ||
</tr> | ||
<!--EndFragment--> | ||
</table> | ||
|
||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<!-- wp:table --> | ||
<figure class="wp-block-table"><table><tbody><tr><td>Cell 1</td><td>Cell 2</td></tr><tr><td>Cell 3</td><td>Cell 4</td></tr></tbody></table></figure> | ||
<!-- /wp:table --> |