You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$this->assertSame( 'iphone-12-x-256gb', sanitize_title_with_dashes( 'iPhone 12 × 256GB', '', 'save' ), 'Product title with multiplication sign and spaces should convert × to x' );
157
+
$this->assertSame( 'screen-1920-x-1080', sanitize_title_with_dashes( 'Screen 1920 × 1080', '', 'save' ), 'Screen dimensions with multiplication sign should convert × to x' );
158
+
}
159
+
160
+
/**
161
+
* @ticket 64284
162
+
*/
163
+
publicfunctiontest_replaces_times_html_entity() {
164
+
$this->assertSame( '6x7-is-42', sanitize_title_with_dashes( '6×7 is 42', '', 'save' ), 'HTML entity × should be replaced with letter x' );
165
+
$this->assertSame( 'product-5x10', sanitize_title_with_dashes( 'Product 5×10', '', 'save' ), 'HTML entity × without spaces should be replaced with letter x' );
$this->assertSame( '3x4-equals-12', sanitize_title_with_dashes( '3×4 equals 12', '', 'save' ), 'Numeric HTML entity × should be replaced with letter x' );
// Should work in display context too, not just 'save'.
180
+
$this->assertSame( '6x7', sanitize_title_with_dashes( '6×7', '', 'display' ), 'Multiplication sign should be replaced with x in display context' );
181
+
$this->assertSame( 'testx', sanitize_title_with_dashes( 'test×', '' ), 'Multiplication sign should be replaced with x when context is not specified' );
0 commit comments