Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions src/js/_enqueues/wp/emoji.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,22 +215,19 @@

// Compose the params for the twitter emoji library.
args = args || {};
const ignored = new Set([
'a9', 'ae', '2122',
'2194', '2195', '2196', '2197', '2198', '2199', '21a9', '21aa',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the new characters introduced in this PR:

'2195', '2196', '2197', '2198', '2199', '21a9', '21aa',

'2660', '2663', '2665', '2666',
Comment on lines +219 to +221
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'a9', 'ae', '2122',
'2194', '2195', '2196', '2197', '2198', '2199', '21a9', '21aa',
'2660', '2663', '2665', '2666',
'a9', // COPYRIGHT SIGN
'ae', // REGISTERED SIGN
'2122', // TRADE MARK SIGN
'2194', // LEFT RIGHT ARROW
'2195', // UP DOWN ARROW
'2196', // NORTH WEST ARROW
'2197', // NORTH EAST ARROW
'2198', // SOUTH EAST ARROW
'2199', // SOUTH WEST ARROW
'21a9', // LEFTWARDS ARROW WITH HOOK
'21aa', // RIGHTWARDS ARROW WITH HOOK
'2660', // BLACK SPADE SUIT
'2663', // BLACK CLUB SUIT
'2665', // BLACK HEART SUIT
'2666', // BLACK DIAMOND SUIT

]);
params = {
base: browserSupportsSvgAsImage() ? settings.svgUrl : settings.baseUrl,
ext: browserSupportsSvgAsImage() ? settings.svgExt : settings.ext,
className: args.className || 'emoji',
callback: function( icon, options ) {
// Ignore some standard characters that TinyMCE recommends in its character map.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is obsolete. We should update the comment to explain why now these characters are ignored.

switch ( icon ) {
case 'a9':
case 'ae':
case '2122':
case '2194':
case '2660':
case '2663':
case '2665':
case '2666':
return false;
if ( ignored.has( icon ) ) {
return false;
}

if ( settings.supports.everythingExceptFlag &&
Expand Down
Loading