Skip to content

Commit a43fa87

Browse files
committed
Merge branch 'trunk' into update/remove-php-ai-client-polyfills
2 parents f56f2f2 + 50d6cf5 commit a43fa87

5 files changed

Lines changed: 11 additions & 8 deletions

File tree

src/js/_enqueues/wp/sanitize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* @return {string} Stripped text.
2424
*/
2525
stripTags: function( text ) {
26-
if ( ! text ) {
26+
if ( 'string' !== typeof text ) {
2727
return '';
2828
}
2929

src/wp-admin/css/common.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -812,10 +812,10 @@ img.emoji {
812812
content: "\f153";
813813
content: "\f153" / '';
814814
display: block;
815-
font: normal 20px/24px dashicons;
816-
height: 24px;
815+
font: normal 20px/1 dashicons;
816+
height: 1em;
817817
text-align: center;
818-
width: 24px;
818+
width: 1em;
819819
-webkit-font-smoothing: antialiased;
820820
-moz-osx-font-smoothing: grayscale;
821821
}

src/wp-admin/css/dashboard.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
outline-offset: -2px;
7373
border-radius: 8px;
7474
height: 250px;
75+
margin: 4px;
7576
}
7677

7778
/* Only highlight drop zones when dragging. */

src/wp-admin/css/list-tables.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ ul.cat-checklist input[name="post_category[]"]:indeterminate::before {
11941194
}
11951195

11961196
#bulk-titles .ntdelbutton:focus {
1197-
box-shadow: 0 0 0 2px #3582c4;
1197+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color, #3858e9);
11981198
/* Only visible in Windows High Contrast mode */
11991199
outline: 2px solid transparent;
12001200
/* Reset inherited offset from Gutenberg */

tests/qunit/wp-includes/js/wp-sanitize.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ QUnit.test( 'stripTags should strip tags from string', function( assert ) {
1717
assert.strictEqual( result, 'Hello World', 'stripTags( "<p>Hello <b>World</b></p>" ) should return "Hello World"' );
1818
} );
1919

20-
QUnit.test( 'stripTags should convert numbers to strings', function( assert ) {
21-
const result = wp.sanitize.stripTags( 123 );
22-
assert.strictEqual( result, '123', 'stripTags( 123 ) should return "123"' );
20+
QUnit.test( 'stripTags should return empty string for truthy non-strings', function( assert ) {
21+
assert.strictEqual( wp.sanitize.stripTags( 123 ), '', 'stripTags( 123 ) should return ""' );
22+
assert.strictEqual( wp.sanitize.stripTags( true ), '', 'stripTags( true ) should return ""' );
23+
assert.strictEqual( wp.sanitize.stripTags( [ 6, 7 ] ), '', 'stripTags( [ 6, 7 ] ) should return ""' );
24+
assert.strictEqual( wp.sanitize.stripTags( { foo: 'bar' } ), '', 'stripTags( ( { foo: \'bar\' } ) should return ""' );
2325
} );
2426

2527
QUnit.test( 'stripTags should return empty string for input 0', function( assert ) {

0 commit comments

Comments
 (0)